axiom-coding-agent-setup 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.js +138 -138
  2. package/package.json +29 -29
package/bin/cli.js CHANGED
@@ -1,139 +1,139 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * AXIOM Coding Agent Setup CLI
5
- *
6
- * Downloads AGENTS.md and .agents/ folder (core docs, templates, skills)
7
- * from the GitHub repository into the current project directory.
8
- */
9
-
10
- const https = require('https');
11
- const fs = require('fs');
12
- const path = require('path');
13
-
14
- const REPO_OWNER = 'mcikalmerdeka';
15
- const REPO_NAME = 'axiom-coding-agent-setup';
16
- const BRANCH = 'main';
17
-
18
- const FILES_TO_DOWNLOAD = [
19
- // Main instructions
20
- 'AGENTS.md',
21
- // Core agent documents
22
- '.agents/engineering.md',
23
- '.agents/stack.md',
24
- '.agents/workflow.md',
25
- // Templates (project-type conventions)
26
- '.agents/templates/ai-engineering-python.md',
27
- '.agents/templates/fullstack-ai-nextjs.md',
28
- // Skills (domain-specific guides)
29
- '.agents/skills/mcp-builder/SKILL.md',
30
- '.agents/skills/n8n-patterns/SKILL.md',
31
- '.agents/skills/ai-integration/SKILL.md',
32
- '.agents/skills/deployment-patterns/SKILL.md'
33
- ];
34
-
35
- const GITHUB_RAW_URL = `https://raw.githubusercontent.com/${REPO_OWNER}/${REPO_NAME}/${BRANCH}`;
36
-
37
- // ANSI color codes for terminal output
38
- const colors = {
39
- reset: '\x1b[0m',
40
- green: '\x1b[32m',
41
- yellow: '\x1b[33m',
42
- red: '\x1b[31m',
43
- cyan: '\x1b[36m',
44
- bold: '\x1b[1m'
45
- };
46
-
47
- function log(message, color = 'reset') {
48
- console.log(`${colors[color]}${message}${colors.reset}`);
49
- }
50
-
51
- function downloadFile(filePath) {
52
- return new Promise((resolve, reject) => {
53
- const url = `${GITHUB_RAW_URL}/${filePath}`;
54
- const localPath = path.join(process.cwd(), filePath);
55
- const dir = path.dirname(localPath);
56
-
57
- // Create directory if it doesn't exist
58
- if (!fs.existsSync(dir)) {
59
- fs.mkdirSync(dir, { recursive: true });
60
- }
61
-
62
- const file = fs.createWriteStream(localPath);
63
-
64
- https.get(url, (response) => {
65
- if (response.statusCode === 200) {
66
- response.pipe(file);
67
- file.on('finish', () => {
68
- file.close();
69
- resolve(filePath);
70
- });
71
- } else if (response.statusCode === 301 || response.statusCode === 302) {
72
- // Handle redirects
73
- https.get(response.headers.location, (redirectResponse) => {
74
- if (redirectResponse.statusCode === 200) {
75
- redirectResponse.pipe(file);
76
- file.on('finish', () => {
77
- file.close();
78
- resolve(filePath);
79
- });
80
- } else {
81
- fs.unlinkSync(localPath);
82
- reject(new Error(`Failed to download ${filePath}: ${redirectResponse.statusCode}`));
83
- }
84
- }).on('error', reject);
85
- } else {
86
- file.close();
87
- fs.unlinkSync(localPath);
88
- reject(new Error(`Failed to download ${filePath}: ${response.statusCode}`));
89
- }
90
- }).on('error', (err) => {
91
- fs.unlinkSync(localPath);
92
- reject(err);
93
- });
94
- });
95
- }
96
-
97
- async function main() {
98
- log('\n' + '='.repeat(60), 'cyan');
99
- log('AXIOM Coding Agent Setup', 'bold');
100
- log('='.repeat(60) + '\n', 'cyan');
101
-
102
- log(`Target directory: ${process.cwd()}\n`, 'yellow');
103
-
104
- let successCount = 0;
105
- let failCount = 0;
106
-
107
- for (const file of FILES_TO_DOWNLOAD) {
108
- try {
109
- process.stdout.write(`Downloading ${file}... `);
110
- await downloadFile(file);
111
- log('✓', 'green');
112
- successCount++;
113
- } catch (error) {
114
- log(`✗ (${error.message})`, 'red');
115
- failCount++;
116
- }
117
- }
118
-
119
- log('\n' + '='.repeat(60), 'cyan');
120
- log(`Setup complete! ${successCount} files downloaded, ${failCount} failed.`, successCount > 0 ? 'green' : 'red');
121
- log('='.repeat(60) + '\n', 'cyan');
122
-
123
- if (successCount > 0) {
124
- log('Your project now has AXIOM coding agent instructions:', 'bold');
125
- log(' - AGENTS.md → Main agent instructions', 'cyan');
126
- log(' - .agents/engineering.md → Engineering principles', 'cyan');
127
- log(' - .agents/stack.md → Tech stack knowledge', 'cyan');
128
- log(' - .agents/workflow.md → Workflow guidelines', 'cyan');
129
- log(' - .agents/templates/ → Project-type conventions', 'cyan');
130
- log(' - .agents/skills/ → Domain-specific skills\n', 'cyan');
131
- }
132
-
133
- process.exit(failCount > 0 ? 1 : 0);
134
- }
135
-
136
- main().catch((error) => {
137
- log(`\nUnexpected error: ${error.message}`, 'red');
138
- process.exit(1);
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * AXIOM Coding Agent Setup CLI
5
+ *
6
+ * Downloads AGENTS.md and .agents/ folder (core docs, templates, skills)
7
+ * from the GitHub repository into the current project directory.
8
+ */
9
+
10
+ const https = require('https');
11
+ const fs = require('fs');
12
+ const path = require('path');
13
+
14
+ const REPO_OWNER = 'mcikalmerdeka';
15
+ const REPO_NAME = 'axiom-coding-agent-setup';
16
+ const BRANCH = 'main';
17
+
18
+ const FILES_TO_DOWNLOAD = [
19
+ // Main instructions
20
+ 'AGENTS.md',
21
+ // Core agent documents
22
+ '.agents/engineering.md',
23
+ '.agents/stack.md',
24
+ '.agents/workflow.md',
25
+ // Templates (project-type conventions)
26
+ '.agents/templates/ai-engineering-python.md',
27
+ '.agents/templates/fullstack-ai-nextjs.md',
28
+ // Skills (domain-specific guides)
29
+ '.agents/skills/mcp-builder/SKILL.md',
30
+ '.agents/skills/n8n-patterns/SKILL.md',
31
+ '.agents/skills/ai-integration/SKILL.md',
32
+ '.agents/skills/deployment-patterns/SKILL.md'
33
+ ];
34
+
35
+ const GITHUB_RAW_URL = `https://raw.githubusercontent.com/${REPO_OWNER}/${REPO_NAME}/${BRANCH}`;
36
+
37
+ // ANSI color codes for terminal output
38
+ const colors = {
39
+ reset: '\x1b[0m',
40
+ green: '\x1b[32m',
41
+ yellow: '\x1b[33m',
42
+ red: '\x1b[31m',
43
+ cyan: '\x1b[36m',
44
+ bold: '\x1b[1m'
45
+ };
46
+
47
+ function log(message, color = 'reset') {
48
+ console.log(`${colors[color]}${message}${colors.reset}`);
49
+ }
50
+
51
+ function downloadFile(filePath) {
52
+ return new Promise((resolve, reject) => {
53
+ const url = `${GITHUB_RAW_URL}/${filePath}`;
54
+ const localPath = path.join(process.cwd(), filePath);
55
+ const dir = path.dirname(localPath);
56
+
57
+ // Create directory if it doesn't exist
58
+ if (!fs.existsSync(dir)) {
59
+ fs.mkdirSync(dir, { recursive: true });
60
+ }
61
+
62
+ const file = fs.createWriteStream(localPath);
63
+
64
+ https.get(url, (response) => {
65
+ if (response.statusCode === 200) {
66
+ response.pipe(file);
67
+ file.on('finish', () => {
68
+ file.close();
69
+ resolve(filePath);
70
+ });
71
+ } else if (response.statusCode === 301 || response.statusCode === 302) {
72
+ // Handle redirects
73
+ https.get(response.headers.location, (redirectResponse) => {
74
+ if (redirectResponse.statusCode === 200) {
75
+ redirectResponse.pipe(file);
76
+ file.on('finish', () => {
77
+ file.close();
78
+ resolve(filePath);
79
+ });
80
+ } else {
81
+ fs.unlinkSync(localPath);
82
+ reject(new Error(`Failed to download ${filePath}: ${redirectResponse.statusCode}`));
83
+ }
84
+ }).on('error', reject);
85
+ } else {
86
+ file.close();
87
+ fs.unlinkSync(localPath);
88
+ reject(new Error(`Failed to download ${filePath}: ${response.statusCode}`));
89
+ }
90
+ }).on('error', (err) => {
91
+ fs.unlinkSync(localPath);
92
+ reject(err);
93
+ });
94
+ });
95
+ }
96
+
97
+ async function main() {
98
+ log('\n' + '='.repeat(60), 'cyan');
99
+ log('AXIOM Coding Agent Setup', 'bold');
100
+ log('='.repeat(60) + '\n', 'cyan');
101
+
102
+ log(`Target directory: ${process.cwd()}\n`, 'yellow');
103
+
104
+ let successCount = 0;
105
+ let failCount = 0;
106
+
107
+ for (const file of FILES_TO_DOWNLOAD) {
108
+ try {
109
+ process.stdout.write(`Downloading ${file}... `);
110
+ await downloadFile(file);
111
+ log('✓', 'green');
112
+ successCount++;
113
+ } catch (error) {
114
+ log(`✗ (${error.message})`, 'red');
115
+ failCount++;
116
+ }
117
+ }
118
+
119
+ log('\n' + '='.repeat(60), 'cyan');
120
+ log(`Setup complete! ${successCount} files downloaded, ${failCount} failed.`, successCount > 0 ? 'green' : 'red');
121
+ log('='.repeat(60) + '\n', 'cyan');
122
+
123
+ if (successCount > 0) {
124
+ log('Your project now has AXIOM coding agent instructions:', 'bold');
125
+ log(' - AGENTS.md → Main agent instructions', 'cyan');
126
+ log(' - .agents/engineering.md → Engineering principles', 'cyan');
127
+ log(' - .agents/stack.md → Tech stack knowledge', 'cyan');
128
+ log(' - .agents/workflow.md → Workflow guidelines', 'cyan');
129
+ log(' - .agents/templates/ → Project-type conventions', 'cyan');
130
+ log(' - .agents/skills/ → Domain-specific skills\n', 'cyan');
131
+ }
132
+
133
+ process.exit(failCount > 0 ? 1 : 0);
134
+ }
135
+
136
+ main().catch((error) => {
137
+ log(`\nUnexpected error: ${error.message}`, 'red');
138
+ process.exit(1);
139
139
  });
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
- {
2
- "name": "axiom-coding-agent-setup",
3
- "version": "1.0.2",
4
- "description": "CLI tool to download AXIOM coding agent setup files into your project",
5
- "main": "bin/cli.js",
6
- "bin": {
7
- "axiom-coding-agent-setup": "bin/cli.js",
8
- "axiom-setup": "bin/cli.js"
9
- },
10
- "scripts": {
11
- "test": "echo \"Error: no test specified\" && exit 1"
12
- },
13
- "keywords": [
14
- "axiom",
15
- "coding-agent",
16
- "setup",
17
- "claude",
18
- "ai-agent"
19
- ],
20
- "author": "mcikalmerdeka",
21
- "license": "MIT",
22
- "repository": {
23
- "type": "git",
24
- "url": "https://github.com/mcikalmerdeka/axiom-coding-agent-setup.git"
25
- },
26
- "engines": {
27
- "node": ">=14.0.0"
28
- }
29
- }
1
+ {
2
+ "name": "axiom-coding-agent-setup",
3
+ "version": "1.0.3",
4
+ "description": "CLI tool to download AXIOM coding agent setup files into your project",
5
+ "main": "bin/cli.js",
6
+ "bin": {
7
+ "axiom-coding-agent-setup": "bin/cli.js",
8
+ "axiom-setup": "bin/cli.js"
9
+ },
10
+ "scripts": {
11
+ "test": "echo \"Error: no test specified\" && exit 1"
12
+ },
13
+ "keywords": [
14
+ "axiom",
15
+ "coding-agent",
16
+ "setup",
17
+ "claude",
18
+ "ai-agent"
19
+ ],
20
+ "author": "mcikalmerdeka",
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/mcikalmerdeka/axiom-coding-agent-setup.git"
25
+ },
26
+ "engines": {
27
+ "node": ">=14.0.0"
28
+ }
29
+ }