atris 2.6.2 → 3.0.0
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.
- package/README.md +124 -34
- package/atris/CLAUDE.md +5 -1
- package/atris/atris.md +4 -0
- package/atris/features/README.md +24 -0
- package/atris/skills/autopilot/SKILL.md +74 -75
- package/atris/skills/endgame/SKILL.md +179 -0
- package/atris/skills/flow/SKILL.md +121 -0
- package/atris/skills/improve/SKILL.md +84 -0
- package/atris/skills/loop/SKILL.md +72 -0
- package/atris/skills/wiki/SKILL.md +61 -0
- package/atris/team/executor/MEMBER.md +10 -4
- package/atris/team/navigator/MEMBER.md +2 -0
- package/atris/team/validator/MEMBER.md +8 -5
- package/atris.md +33 -0
- package/bin/atris.js +210 -41
- package/commands/activate.js +28 -2
- package/commands/align.js +720 -0
- package/commands/auth.js +75 -2
- package/commands/autopilot.js +1213 -270
- package/commands/browse.js +100 -0
- package/commands/business.js +785 -12
- package/commands/clean.js +107 -2
- package/commands/computer.js +429 -0
- package/commands/context-sync.js +78 -8
- package/commands/experiments.js +351 -0
- package/commands/feedback.js +150 -0
- package/commands/fleet.js +395 -0
- package/commands/fork.js +127 -0
- package/commands/init.js +50 -1
- package/commands/learn.js +407 -0
- package/commands/lifecycle.js +94 -0
- package/commands/loop.js +114 -0
- package/commands/publish.js +129 -0
- package/commands/pull.js +434 -48
- package/commands/push.js +312 -164
- package/commands/review.js +149 -0
- package/commands/run.js +76 -43
- package/commands/serve.js +360 -0
- package/commands/setup.js +1 -1
- package/commands/soul.js +381 -0
- package/commands/status.js +119 -1
- package/commands/sync.js +147 -1
- package/commands/terminal.js +201 -0
- package/commands/wiki.js +376 -0
- package/commands/workflow.js +191 -74
- package/commands/workspace-clean.js +3 -3
- package/lib/endstate.js +259 -0
- package/lib/learnings.js +235 -0
- package/lib/manifest.js +1 -0
- package/lib/todo.js +9 -5
- package/lib/wiki.js +578 -0
- package/package.json +2 -2
- package/utils/api.js +48 -36
- package/utils/auth.js +1 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const { loadCredentials } = require('../utils/auth');
|
|
5
|
+
const { apiRequestJson } = require('../utils/api');
|
|
6
|
+
|
|
7
|
+
async function browseAtris() {
|
|
8
|
+
const query = process.argv[3] && !process.argv[3].startsWith('-') ? process.argv[3] : null;
|
|
9
|
+
|
|
10
|
+
if (process.argv[3] === '--help') {
|
|
11
|
+
console.log('Usage: atris browse [query]');
|
|
12
|
+
console.log('');
|
|
13
|
+
console.log(' atris browse List all workspace templates');
|
|
14
|
+
console.log(' atris browse crm Search for templates matching "crm"');
|
|
15
|
+
process.exit(0);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const creds = loadCredentials();
|
|
19
|
+
if (!creds || !creds.token) {
|
|
20
|
+
console.error('Not logged in. Run: atris login');
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
console.log('');
|
|
25
|
+
const label = query ? `Searching templates for "${query}"...` : 'Browsing workspace templates...';
|
|
26
|
+
console.log(label);
|
|
27
|
+
|
|
28
|
+
const endpoint = query
|
|
29
|
+
? `/workspace/templates?q=${encodeURIComponent(query)}`
|
|
30
|
+
: '/workspace/templates';
|
|
31
|
+
|
|
32
|
+
const result = await apiRequestJson(endpoint, { method: 'GET', token: creds.token });
|
|
33
|
+
|
|
34
|
+
if (!result.ok) {
|
|
35
|
+
// API failed — try local templates
|
|
36
|
+
console.log(' API unavailable, checking local templates...');
|
|
37
|
+
const localDir = path.join(os.homedir(), '.atris', 'templates');
|
|
38
|
+
if (!fs.existsSync(localDir)) {
|
|
39
|
+
console.error(' No templates found locally or from API.');
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const dirs = fs.readdirSync(localDir).filter(d => {
|
|
44
|
+
return fs.statSync(path.join(localDir, d)).isDirectory();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
if (dirs.length === 0) {
|
|
48
|
+
console.log(' No local templates found.');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
console.log('');
|
|
53
|
+
console.log(` ${dirs.length} local template${dirs.length > 1 ? 's' : ''}:`);
|
|
54
|
+
console.log('');
|
|
55
|
+
for (const name of dirs) {
|
|
56
|
+
const metaFile = path.join(localDir, name, 'template.json');
|
|
57
|
+
let desc = '';
|
|
58
|
+
if (fs.existsSync(metaFile)) {
|
|
59
|
+
try {
|
|
60
|
+
const meta = JSON.parse(fs.readFileSync(metaFile, 'utf8'));
|
|
61
|
+
desc = meta.description || '';
|
|
62
|
+
} catch {}
|
|
63
|
+
}
|
|
64
|
+
console.log(` ${name}${desc ? ' — ' + desc : ''}`);
|
|
65
|
+
}
|
|
66
|
+
console.log('');
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const templates = result.data || [];
|
|
71
|
+
|
|
72
|
+
if (templates.length === 0) {
|
|
73
|
+
console.log('');
|
|
74
|
+
console.log(query ? ` No templates found for "${query}".` : ' No templates available.');
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
console.log('');
|
|
79
|
+
console.log(` ${templates.length} template${templates.length > 1 ? 's' : ''} found:`);
|
|
80
|
+
console.log('');
|
|
81
|
+
|
|
82
|
+
for (const t of templates) {
|
|
83
|
+
const name = t.name || 'untitled';
|
|
84
|
+
const desc = t.description || '';
|
|
85
|
+
const agents = typeof t.agent_count === 'number' ? `${t.agent_count} agents` : '';
|
|
86
|
+
const forks = typeof t.fork_count === 'number' ? `${t.fork_count} forks` : '';
|
|
87
|
+
const author = t.author || '';
|
|
88
|
+
|
|
89
|
+
const meta = [agents, forks, author].filter(Boolean).join(' | ');
|
|
90
|
+
console.log(` ${name}`);
|
|
91
|
+
if (desc) console.log(` ${desc}`);
|
|
92
|
+
if (meta) console.log(` ${meta}`);
|
|
93
|
+
console.log('');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
console.log(` Fork any template with: atris fork <name>`);
|
|
97
|
+
console.log('');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
module.exports = { browseAtris };
|