diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 6b02558cc..99d67ad88 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -1030,11 +1030,29 @@ def list_registry(registry_path, with_expired):
 def list_configs(settings, args):
     import tempfile
     top_dir = tempfile.mkdtemp(prefix="bitbake-setup-list-")
-    settings['default']['dl-dir'] = os.path.join(top_dir, '.bitbake-setup-downloads')
-    d = init_bb_cache(top_dir, settings, args)
-    registry_path = update_registry(settings["default"]["registry"], cache_dir(top_dir), d)
-    json_data = list_registry(registry_path, args.with_expired)
-    shutil.rmtree(top_dir)
+    try:
+        settings['default']['dl-dir'] = os.path.join(top_dir, '.bitbake-setup-downloads')
+        d = init_bb_cache(top_dir, settings, args)
+        registry_path = update_registry(settings["default"]["registry"], cache_dir(top_dir), d)
+        json_data = list_registry(registry_path, args.with_expired)
+        # AI-Generated: Uses OpenAI Codex (gpt-6.1-sol). Export the template without selecting build options.
+        if args.config is not None:
+            if args.config not in json_data:
+                logger.error("Unable to find {} in available configurations; use 'list' sub-command to see what is available".format(args.config))
+                sys.exit(1)
+            with open(get_registry_config(registry_path, args.config)) as f:
+                template = json.load(f)
+    except json.JSONDecodeError as e:
+        logger.error("Failed to parse configuration: %s" % e)
+        sys.exit(1)
+    finally:
+        shutil.rmtree(top_dir)
+
+    if args.config is not None:
+        with open(args.write_json, 'w') as f:
+            json.dump(template, f, sort_keys=True, indent=4)
+        logger.plain("Configuration {} written into {}".format(args.config, args.write_json))
+        return
 
     logger.plain("Available configurations:")
     for config_name, config_data in sorted(json_data.items()):
@@ -1347,6 +1365,7 @@ def main():
     parser_list = subparsers.add_parser('list', help='List available configurations')
     parser_list.add_argument('--with-expired', action='store_true', help='List also configurations that are no longer supported due to reaching their end-of-life dates.')
     parser_list.add_argument('--write-json', action='store', help='Write available configurations into a json file so they can be programmatically processed.')
+    parser_list.add_argument('--config', metavar='TEMPLATE_ID', help='Export a complete Configuration Template instead of the registry listing (requires --write-json).')
     parser_list.set_defaults(func=list_configs)
 
     parser_init = subparsers.add_parser('init', help='Select a configuration and initialize a setup from it')
@@ -1406,6 +1425,9 @@ def main():
 
     args = parser.parse_args()
 
+    if getattr(args, 'func', None) == list_configs and args.config is not None and not args.write_json:
+        parser_list.error('--config requires --write-json')
+
     if args.debug:
         logger.setLevel(logging.DEBUG)
     elif args.quiet:
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
index e15c9ed0d..d1c1543dc 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-environment-setup.rst
@@ -410,6 +410,10 @@ In addition, the command can take the following arguments:
 -  ``--write-json``: write the configurations into a JSON file so they can be
    programmatically processed.
 
+-  ``--config TEMPLATE_ID``: with ``--write-json OUTPUT``, export the complete
+   selected Configuration Template as JSON without initializing a setup.
+   Expired templates require ``--with-expired``.
+
 .. _ref-bbsetup-command-status:
 
 ``bitbake-setup status``
diff --git a/lib/bb/tests/setup.py b/lib/bb/tests/setup.py
index 53a07ee3a..7636f1d53 100644
--- a/lib/bb/tests/setup.py
+++ b/lib/bb/tests/setup.py
@@ -17,6 +17,7 @@ import subprocess
 import sys
 import tempfile
 import unittest
+from unittest import mock
 import venv
 import zipfile
 from bb.tests.support.httpserver import HTTPService
@@ -319,6 +320,141 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"]))
             return os.path.join(self.tempdir, 'bitbake-builds', 'this-is-a-custom-gizmo-build')
         return os.path.join(self.tempdir, 'bitbake-builds', '{}-{}'.format(cf, "-".join(c.split())))
 
+    # AI-Generated: Uses OpenAI Codex (gpt-6.1-sol). Offline template export coverage.
+    def run_list_fixture(self, args, registry=None):
+        # Isolate all temporary cache directories and forbid network access.
+        tmpdir = os.path.join(self.tempdir, 'list-tmp')
+        os.makedirs(tmpdir, exist_ok=True)
+        with mock.patch.dict(os.environ, {'TMPDIR': tmpdir, 'BBPATH': ''}):
+            try:
+                return self.runbbsetup([
+                    '--no-network', '--setting', 'default', 'registry', registry or self.tempdir,
+                    'list'] + args)
+            finally:
+                self.assertEqual(os.listdir(tmpdir), [])
+                self.assertFalse(os.path.exists(os.path.join(self.tempdir, 'bitbake-builds')))
+                self.assertFalse(os.path.exists(os.path.join(self.tempdir, '.bitbake-setup-cache')))
+                for root, dirs, files in os.walk(self.tempdir):
+                    self.assertNotIn('site.conf', files)
+                    self.assertNotIn('layers', dirs)
+                    self.assertNotIn('.vscode', dirs)
+                    self.assertFalse(any(f.endswith('.code-workspace') for f in files))
+
+    def write_list_fixture(self, data):
+        registry = os.path.join(self.tempdir, 'configurations', 'nested')
+        os.makedirs(registry, exist_ok=True)
+        path = os.path.join(registry, 'test-template.conf.json')
+        with open(path, 'w') as f:
+            json.dump(data, f)
+        return path
+
+    def test_list_export_template(self):
+        output = os.path.join(self.tempdir, 'template.json')
+        for count in (1, 2):
+            with self.subTest(configurations=count):
+                template = {
+                    'description': 'Complete template', 'version': '1.0',
+                    'sources': {'unused': {'git-remote': {'remotes': {
+                        'origin': {'uri': 'file://' + os.path.join(self.tempdir, 'unused-layer')}},
+                        'branch': 'main', 'rev': 'HEAD'}}},
+                    'bitbake-setup': {'configurations': [
+                        {'name': 'config-{}'.format(i), 'oe-template': 'unused',
+                         'oe-fragments-one-of': {'choice': {'options': ['a', 'b']}}}
+                        for i in range(count)]},
+                    'extension': {'nested': [None, True, False, 42, 1.5, 'café',
+                                             {'empty': [], 'object': {}}]},
+                }
+                self.write_list_fixture(template)
+                self.run_list_fixture(['--config', 'test-template', '--write-json', output])
+                with open(output) as f:
+                    self.assertEqual(json.load(f), template)
+
+    def test_list_export_unknown(self):
+        self.write_list_fixture({'description': 'Available template'})
+        output = os.path.join(self.tempdir, 'template.json')
+        for existing in (False, True):
+            with self.subTest(existing=existing):
+                if existing:
+                    with open(output, 'w') as f:
+                        f.write('keep existing output')
+                with self.assertRaises(bb.process.ExecutionError) as error:
+                    self.run_list_fixture(['--config', 'missing', '--write-json', output])
+                self.assertIn('Unable to find missing', str(error.exception))
+                if existing:
+                    with open(output) as f:
+                        self.assertEqual(f.read(), 'keep existing output')
+                else:
+                    self.assertFalse(os.path.exists(output))
+
+    def test_list_export_expired(self):
+        template = {'description': 'Expired template', 'expires': '2000-01-01',
+                    'bitbake-setup': {'configurations': [{'name': 'expired'}]}}
+        self.write_list_fixture(template)
+        output = os.path.join(self.tempdir, 'template.json')
+        with self.assertRaises(bb.process.ExecutionError) as error:
+            self.run_list_fixture(['--config', 'test-template', '--write-json', output])
+        self.assertIn('Unable to find test-template', str(error.exception))
+        self.assertFalse(os.path.exists(output))
+        self.run_list_fixture(['--config', 'test-template', '--with-expired', '--write-json', output])
+        with open(output) as f:
+            self.assertEqual(json.load(f), template)
+
+    def test_list_export_invalid_arguments(self):
+        with self.assertRaises(bb.process.ExecutionError) as error:
+            self.run_list_fixture(['--config', 'test-template'])
+        self.assertEqual(error.exception.exitcode, 2)
+        self.assertIn('--config requires --write-json', str(error.exception))
+
+    def test_list_export_invalid_json(self):
+        path = self.write_list_fixture({'description': 'Broken template'})
+        with open(path, 'w') as f:
+            f.write('{invalid json')
+        output = os.path.join(self.tempdir, 'template.json')
+        for existing in (False, True):
+            with self.subTest(existing=existing):
+                if existing:
+                    with open(output, 'w') as f:
+                        f.write('keep existing output')
+                with self.assertRaises(bb.process.ExecutionError) as error:
+                    self.run_list_fixture(['--config', 'test-template', '--write-json', output])
+                self.assertIn('Failed to parse configuration', str(error.exception))
+                if existing:
+                    with open(output) as f:
+                        self.assertEqual(f.read(), 'keep existing output')
+                else:
+                    self.assertFalse(os.path.exists(output))
+
+    def test_list_export_registry_failure(self):
+        output = os.path.join(self.tempdir, 'template.json')
+        registry = 'git://{};protocol=file;branch=master;rev=master'.format(
+            os.path.join(self.tempdir, 'missing-registry'))
+        with self.assertRaises(bb.process.ExecutionError):
+            self.run_list_fixture(['--config', 'test-template', '--write-json', output],
+                                  registry=registry)
+        self.assertFalse(os.path.exists(output))
+
+    def test_list_registry_json_compatibility(self):
+        self.write_list_fixture({'description': 'Available template', 'extra': {'a': [1, 2]}})
+        registry = os.path.join(self.tempdir, 'configurations')
+        with open(os.path.join(registry, 'old.conf.json'), 'w') as f:
+            json.dump({'description': 'Old template', 'expires': '2000-01-01'}, f)
+        output = os.path.join(self.tempdir, 'registry.json')
+        for expired in (False, True):
+            with self.subTest(with_expired=expired):
+                flags = ['--with-expired'] if expired else []
+                plain = self.run_list_fixture(flags)[0]
+                written = self.run_list_fixture(flags + ['--write-json', output])[0]
+                self.assertEqual(written, plain + 'Available configurations written into {}\n'.format(output))
+                self.assertIn('test-template\tAvailable template', plain)
+                expected = {'test-template': {'description': 'Available template'}}
+                if expired:
+                    expected['old'] = {'description': 'Old template', 'expires': '2000-01-01'}
+                    self.assertIn('old\tOld template (supported until 2000-01-01)', plain)
+                else:
+                    self.assertNotIn('old\t', plain)
+                with open(output) as f:
+                    self.assertEqual(json.load(f), expected)
+
     def test_setup(self):
         # unset BBPATH to ensure tests run in isolation from the existing bitbake environment
         if 'BBPATH' in os.environ:
