{"id":262,"date":"2025-06-17T11:25:19","date_gmt":"2025-06-17T11:25:19","guid":{"rendered":"https:\/\/cptdcli.com\/?p=262"},"modified":"2025-06-17T11:26:13","modified_gmt":"2025-06-17T11:26:13","slug":"cptd-cli","status":"publish","type":"post","link":"https:\/\/www.cptdcli.org\/?p=262","title":{"rendered":"CPTD CLI"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>CPTD CLI<\/strong> is not just a command-line tool. It is an extensible management platform designed to:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>create custom commands and extensions;<\/li>\n\n\n\n<li>enable command exchange between users;<\/li>\n\n\n\n<li>integrate with external tools and APIs;<\/li>\n\n\n\n<li>automate workflows, reporting, and strategic analysis;<\/li>\n\n\n\n<li>serve as the engine for any user or graphical interface (UI).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Architectural Principles<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. CLI as an Extensible Platform<\/strong><br>Each command is a regular Python file with a defined interface. You can create your own command in under 5 minutes.<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading262_65506f-af, .wp-block-kadence-advancedheading.kt-adv-heading262_65506f-af[data-kb-block=\"kb-adv-heading262_65506f-af\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading262_65506f-af mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading262_65506f-af[data-kb-block=\"kb-adv-heading262_65506f-af\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}<\/style>\n<p class=\"kt-adv-heading262_65506f-af wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading262_65506f-af\">Commands are simple Python modules with minimal structure. Each command includes a manifest file containing information such as name, description, author, version, and dependencies. Developers can use the cptd newcommand template to get started quickly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Commands can be tested and debugged interactively without restarting the system:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cptd command --add yourcommand.zip     # add command (ZIP only)  \ncptd command --del yourcommand         # remove command\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To run a command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cptd yourcommand\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To run a project:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cptd yourcommand\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Security and Validation<\/strong><br>All commands in the shared repository undergo strict security checks.<br>During installation, the system automatically scans for prohibited code (e.g., pip install within the command).<br>Upon submission to the public repository, each command is verified for security, structure, and manifest integrity.<br>Community-submitted commands are moderated before publication.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. CLI as a Backend Engine for UI<\/strong><br>The CLI serves as the core engine for graphical interfaces, which use it to execute logic.<br>CPTD CLI acts as the backend for all current and future UIs \u2014 all logic is processed through the CLI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. Centralized and Decentralized Distribution<\/strong><br>Commands can be loaded and used from the shared repository.<br>A standard format is supported for importing, exporting, and sharing commands.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5. Autonomy and Reliability<\/strong><br>Works fully offline \u2014 no cloud required.<br>No telemetry, hidden data collection, or external connections.<br>Supports Windows, Linux, and macOS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why This Matters<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Flexibility<\/strong>: Adapt the CLI to any scenario \u2014 from license checks to full automation.<\/li>\n\n\n\n<li><strong>Scalability<\/strong>: From solo developers to full teams.<\/li>\n\n\n\n<li><strong>Extensibility<\/strong>: Create, share, moderate, and integrate commands.<\/li>\n\n\n\n<li><strong>Security<\/strong>: Strict checks at all stages \u2014 install, execution, and publishing.<\/li>\n\n\n\n<li><strong>Transparency<\/strong>: Fully open-source, modular, and auditable.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Open Source and Repository<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">CPTD CLI is a free and open-source project.<br>The complete source code is available in the public repository:<br><strong><a href=\"https:\/\/github.com\/asbjornrasen\/cptd-dsl\">https:\/\/github.com\/asbjornrasen\/cptd-dsl<\/a><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This ensures full transparency, builds trust and security, and gives everyone the opportunity to inspect, improve, or reuse the system.<br>Thanks to its openness, CPTD guarantees independence and verifiability in the long term.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CPTD CLI is not just a command-line tool. It is an extensible management platform designed to: Architectural Principles 1. CLI as an Extensible PlatformEach command is a regular Python file with a defined interface. You can create your own command in under 5 minutes. Commands are simple Python modules with minimal structure. Each command includes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":145,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262"}],"version-history":[{"count":2,"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":264,"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions\/264"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=\/wp\/v2\/media\/145"}],"wp:attachment":[{"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cptdcli.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}