diff --git a/dvc/cli.py b/dvc/cli.py
index 7d6f553b9..d7696ab76 100644
--- a/dvc/cli.py
+++ b/dvc/cli.py
@@ -332,6 +332,11 @@ def parse_args(argv=None):
                         action='store_true',
                         default=False,
                         help='Use local config')
+    remote_add_parser.add_argument('-d',
+                        '--default',
+                        action='store_true',
+                        default=False,
+                        help='Set as default remote')
     remote_add_parser.set_defaults(func=CmdRemoteAdd)
 
 
diff --git a/dvc/command/remote.py b/dvc/command/remote.py
index d0335d830..cca6ddb90 100644
--- a/dvc/command/remote.py
+++ b/dvc/command/remote.py
@@ -8,8 +8,15 @@ from dvc.logger import Logger
 class CmdRemoteAdd(CmdConfig):
     def run(self):
         section = Config.SECTION_REMOTE_FMT.format(self.args.name)
-        return self.set(section, Config.SECTION_REMOTE_URL, self.args.url)
+        ret = self.set(section, Config.SECTION_REMOTE_URL, self.args.url)
+        if ret != 0:
+            return ret
 
+        if self.args.default:
+            Logger.info('Setting \'{}\' as a default remote.'.format(self.args.name))
+            ret = self.set(Config.SECTION_CORE, Config.SECTION_CORE_REMOTE, self.args.name)
+
+        return ret
 
 class CmdRemoteRemove(CmdConfig):
     def run(self):

Add option for `dvc remote add` to set default remote
Currently when you setup first remote for your repo, you need to manually set it as a default one in a config:
```
dvc remote add myremote s3://mybucket/
dvc config core.remote myremote
```
Lets just do it automatically by providing -d|--default option for `dvc remote add`.
diff --git a/tests/test_remote.py b/tests/test_remote.py
index 8ad6b35b6..cdc74e5c7 100644
--- a/tests/test_remote.py
+++ b/tests/test_remote.py
@@ -11,7 +11,7 @@ class TestRemote(TestDvc):
         self.assertNotEqual(main(['remote', 'remove', remotes[0]]), 0)
 
         for r in remotes:
-            self.assertEqual(main(['remote', 'add', r, 's3://bucket/name']), 0)
+            self.assertEqual(main(['remote', 'add', '--default', r, 's3://bucket/name']), 0)
 
         self.assertEqual(main(['remote', 'list']), 0)
 

pip install -e .
parse_log_pytest
requirements.txt
pytest>=3.3.1 pytest-cov pytest-xdist pytest-mock pytest-asyncio pytest
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
altgraph==0.17.4
bcrypt==4.3.0
binaryornot==0.4.4
boto3==1.7.4
botocore==1.10.84
cachetools==4.2.4
certifi==2025.1.31
cffi==1.17.1
chardet==5.2.0
charset-normalizer==3.4.1
colorama==0.4.6
configobj==5.0.9
configparser==7.2.0
coverage==7.8.0
cryptography==44.0.2
decorator==5.2.1
dill==0.2.9
docutils==0.21.2
-e git+https://github.com/iterative/dvc.git@3a914ceff27760991f5815f24db248ff4e94e71f#egg=dvc
exceptiongroup==1.2.2
execnet==2.1.1
future==0.16.0
gapic-google-cloud-datastore-v1==0.15.3
gapic-google-cloud-error-reporting-v1beta1==0.15.3
gapic-google-cloud-logging-v2==0.91.3
gitdb==4.0.12
GitPython==3.1.44
google-api-core==0.1.4
google-auth==1.35.0
google-cloud==0.32.0
google-cloud-bigquery==0.28.0
google-cloud-bigquery-datatransfer==0.1.1
google-cloud-bigtable==0.28.1
google-cloud-container==0.1.1
google-cloud-core==0.28.1
google-cloud-datastore==1.4.0
google-cloud-dns==0.28.0
google-cloud-error-reporting==0.28.0
google-cloud-firestore==0.28.0
google-cloud-language==1.0.2
google-cloud-logging==1.4.0
google-cloud-monitoring==0.28.1
google-cloud-pubsub==0.30.1
google-cloud-resource-manager==0.28.1
google-cloud-runtimeconfig==0.28.1
google-cloud-spanner==0.29.0
google-cloud-speech==0.30.0
google-cloud-storage==1.6.0
google-cloud-trace==0.17.0
google-cloud-translate==1.3.1
google-cloud-videointelligence==1.0.1
google-cloud-vision==0.29.0
google-crc32c==1.7.1
google-gax==0.15.16
google-resumable-media==2.7.2
googleapis-common-protos==1.69.2
grpc-google-iam-v1==0.11.4
grpcio==1.71.0
httplib2==0.22.0
idna==3.10
iniconfig==2.1.0
jmespath==0.10.0
jsonpath-rw==1.4.0
macholib==1.16.3
nanotime==0.5.2
networkx==3.2.1
ntfsutils==0.1.5
oauth2client==3.0.0
packaging==24.2
paramiko==3.5.1
pefile==2024.8.26
pluggy==1.5.0
ply==3.8
proto-google-cloud-datastore-v1==0.90.4
proto-google-cloud-error-reporting-v1beta1==0.15.3
proto-google-cloud-logging-v2==0.91.3
protobuf==3.20.3
psutil==5.9.8
pyasn1==0.6.1
pyasn1_modules==0.4.2
pycparser==2.22
PyInstaller==3.3.1
PyNaCl==1.5.0
pyparsing==3.2.3
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.2
reflink==0.2.0
requests==2.32.3
rsa==4.9
s3transfer==0.1.13
schema==0.7.7
six==1.17.0
smmap==5.0.2
tomli==2.2.1
typing_extensions==4.13.0
urllib3==2.3.0
zc.lockfile==3.0.post1

name: dvc
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - altgraph==0.17.4
      - bcrypt==4.3.0
      - binaryornot==0.4.4
      - boto3==1.7.4
      - botocore==1.10.84
      - cachetools==4.2.4
      - certifi==2025.1.31
      - cffi==1.17.1
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - colorama==0.4.6
      - configobj==5.0.9
      - configparser==7.2.0
      - coverage==7.8.0
      - cryptography==44.0.2
      - decorator==5.2.1
      - dill==0.2.9
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - future==0.16.0
      - gapic-google-cloud-datastore-v1==0.15.3
      - gapic-google-cloud-error-reporting-v1beta1==0.15.3
      - gapic-google-cloud-logging-v2==0.91.3
      - gitdb==4.0.12
      - gitpython==3.1.44
      - google-api-core==0.1.4
      - google-auth==1.35.0
      - google-cloud==0.32.0
      - google-cloud-bigquery==0.28.0
      - google-cloud-bigquery-datatransfer==0.1.1
      - google-cloud-bigtable==0.28.1
      - google-cloud-container==0.1.1
      - google-cloud-core==0.28.1
      - google-cloud-datastore==1.4.0
      - google-cloud-dns==0.28.0
      - google-cloud-error-reporting==0.28.0
      - google-cloud-firestore==0.28.0
      - google-cloud-language==1.0.2
      - google-cloud-logging==1.4.0
      - google-cloud-monitoring==0.28.1
      - google-cloud-pubsub==0.30.1
      - google-cloud-resource-manager==0.28.1
      - google-cloud-runtimeconfig==0.28.1
      - google-cloud-spanner==0.29.0
      - google-cloud-speech==0.30.0
      - google-cloud-storage==1.6.0
      - google-cloud-trace==0.17.0
      - google-cloud-translate==1.3.1
      - google-cloud-videointelligence==1.0.1
      - google-cloud-vision==0.29.0
      - google-crc32c==1.7.1
      - google-gax==0.15.16
      - google-resumable-media==2.7.2
      - googleapis-common-protos==1.69.2
      - grpc-google-iam-v1==0.11.4
      - grpcio==1.71.0
      - httplib2==0.22.0
      - idna==3.10
      - iniconfig==2.1.0
      - jmespath==0.10.0
      - jsonpath-rw==1.4.0
      - macholib==1.16.3
      - nanotime==0.5.2
      - networkx==3.2.1
      - ntfsutils==0.1.5
      - oauth2client==3.0.0
      - packaging==24.2
      - paramiko==3.5.1
      - pefile==2024.8.26
      - pluggy==1.5.0
      - ply==3.8
      - proto-google-cloud-datastore-v1==0.90.4
      - proto-google-cloud-error-reporting-v1beta1==0.15.3
      - proto-google-cloud-logging-v2==0.91.3
      - protobuf==3.20.3
      - psutil==5.9.8
      - pyasn1==0.6.1
      - pyasn1-modules==0.4.2
      - pycparser==2.22
      - pyinstaller==3.3.1
      - pynacl==1.5.0
      - pyparsing==3.2.3
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.2
      - reflink==0.2.0
      - requests==2.32.3
      - rsa==4.9
      - s3transfer==0.1.13
      - schema==0.7.7
      - six==1.17.0
      - smmap==5.0.2
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - zc-lockfile==3.0.post1
prefix: /opt/conda/envs/dvc

tests/test_remote.py::TestRemote::test
dvc/command/remote.py dvc/cli.py
dvc/command/remote.py dvc/cli.py