@promptowl/contextnest-cli 0.4.0 → 0.5.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 +12 -12
- package/dist/index.js +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,9 +41,9 @@ ctx init --name "My Vault"
|
|
|
41
41
|
- `ctx list` — List documents (filter by `--type`, `--status`, `--tag`)
|
|
42
42
|
- `ctx search <query>` — Full-text search
|
|
43
43
|
|
|
44
|
-
### Context
|
|
45
|
-
- `ctx
|
|
46
|
-
- `ctx
|
|
44
|
+
### Context Queries
|
|
45
|
+
- `ctx query <selector>` — Query context from your vault
|
|
46
|
+
- `ctx query @org/pack` — Query from a cloud-hosted pack
|
|
47
47
|
- `ctx resolve <selector>` — Execute a selector query
|
|
48
48
|
|
|
49
49
|
### Versioning & Integrity
|
|
@@ -63,21 +63,21 @@ ctx init --name "My Vault"
|
|
|
63
63
|
## Selectors
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
ctx
|
|
67
|
-
ctx
|
|
68
|
-
ctx
|
|
69
|
-
ctx
|
|
70
|
-
ctx
|
|
71
|
-
ctx
|
|
72
|
-
ctx
|
|
66
|
+
ctx query "tag:#engineering" # All docs with a tag
|
|
67
|
+
ctx query "type:document" # All docs of a type
|
|
68
|
+
ctx query "path:nodes/api-*" # Glob match
|
|
69
|
+
ctx query "pack:engineering-essentials" # All docs in a pack
|
|
70
|
+
ctx query "status:published" # By status
|
|
71
|
+
ctx query "tag:#api + tag:#v2" # Union
|
|
72
|
+
ctx query "tag:#api & status:published" # Intersection
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
## Cloud Packs
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
Query context from cloud-hosted packs without downloading source files:
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
|
-
ctx
|
|
80
|
+
ctx query @promptowl/executive-ai-strategy
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
## Links
|
package/dist/index.js
CHANGED
|
@@ -32187,7 +32187,7 @@ var BASE_CONTEXT = `
|
|
|
32187
32187
|
This vault is managed by Context Nest CLI (ctx). The following commands are available:
|
|
32188
32188
|
|
|
32189
32189
|
Commands: init, add, update, delete, publish, validate, list, search, history,
|
|
32190
|
-
resolve,
|
|
32190
|
+
resolve, query, index, verify, reconstruct, pack list, pack show,
|
|
32191
32191
|
checkpoint list, checkpoint rebuild
|
|
32192
32192
|
|
|
32193
32193
|
Vault structure:
|
|
@@ -32941,7 +32941,7 @@ tr:hover td { background: var(--bg-alt); }
|
|
|
32941
32941
|
<li><div class="check-box" onclick="this.classList.toggle('checked')"></div><div><strong>Open this project in your AI assistant</strong> — it reads your vault automatically via CONTEXT.md</div></li>
|
|
32942
32942
|
<li><div class="check-box" onclick="this.classList.toggle('checked')"></div><div><strong>Try searching:</strong> <code>ctx search "your topic"</code></div></li>
|
|
32943
32943
|
<li><div class="check-box" onclick="this.classList.toggle('checked')"></div><div><strong>Add your first document:</strong> <code>ctx add nodes/my-doc --title "My Document"</code></div></li>
|
|
32944
|
-
<li><div class="check-box" onclick="this.classList.toggle('checked')"></div><div><strong>Explore a cloud pack:</strong> <code>ctx
|
|
32944
|
+
<li><div class="check-box" onclick="this.classList.toggle('checked')"></div><div><strong>Explore a cloud pack:</strong> <code>ctx query @promptowl/starter-pack</code></div></li>
|
|
32945
32945
|
<li><div class="check-box" onclick="this.classList.toggle('checked')"></div><div><strong>Share your vault</strong> with a teammate — they just need the folder</div></li>
|
|
32946
32946
|
</ul>
|
|
32947
32947
|
</div>
|
|
@@ -32976,7 +32976,7 @@ tr:hover td { background: var(--bg-alt); }
|
|
|
32976
32976
|
<!-- CTA -->
|
|
32977
32977
|
<div class="cta-bar">
|
|
32978
32978
|
<h3>Ready for more?</h3>
|
|
32979
|
-
<p>Cloud packs give you curated expertise from domain experts. 50 free
|
|
32979
|
+
<p>Cloud packs give you curated expertise from domain experts. 50 free queries/month.</p>
|
|
32980
32980
|
<a class="cta-btn" href="https://promptowl.ai/marketplace" target="_blank">Browse Cloud Packs</a>
|
|
32981
32981
|
</div>
|
|
32982
32982
|
|
|
@@ -33051,7 +33051,7 @@ function buildTreeLines(paths) {
|
|
|
33051
33051
|
|
|
33052
33052
|
// src/index.ts
|
|
33053
33053
|
var program = new Command();
|
|
33054
|
-
program.name("ctx").description("Context Nest CLI \u2014 manage structured, versioned context vaults").version("0.
|
|
33054
|
+
program.name("ctx").description("Context Nest CLI \u2014 manage structured, versioned context vaults").version("0.5.0");
|
|
33055
33055
|
function getVaultRoot() {
|
|
33056
33056
|
return process.env.CONTEXTNEST_VAULT_PATH || process.cwd();
|
|
33057
33057
|
}
|
|
@@ -33457,7 +33457,7 @@ program.command("index").description("Regenerate context.yaml and INDEX.md files
|
|
|
33457
33457
|
console.log(chalk.green(`Generated ${folder}/INDEX.md`));
|
|
33458
33458
|
}
|
|
33459
33459
|
});
|
|
33460
|
-
async function
|
|
33460
|
+
async function queryFromCloud(selector, opts) {
|
|
33461
33461
|
const match = selector.match(/^@([^/]+)\/(.+)$/);
|
|
33462
33462
|
if (!match) {
|
|
33463
33463
|
console.log(chalk.red(`Invalid cloud pack format: ${selector}`));
|
|
@@ -33479,7 +33479,7 @@ async function injectFromCloud(selector, opts) {
|
|
|
33479
33479
|
if (res.status === 429) {
|
|
33480
33480
|
const body = await res.json();
|
|
33481
33481
|
console.log(chalk.red(`
|
|
33482
|
-
${body.message || "
|
|
33482
|
+
${body.message || "Query quota exceeded"}`));
|
|
33483
33483
|
if (body.upgrade_url) {
|
|
33484
33484
|
console.log(chalk.yellow(` Upgrade: ${body.upgrade_url}`));
|
|
33485
33485
|
}
|
|
@@ -33487,7 +33487,7 @@ async function injectFromCloud(selector, opts) {
|
|
|
33487
33487
|
}
|
|
33488
33488
|
if (!res.ok) {
|
|
33489
33489
|
const body = await res.text();
|
|
33490
|
-
console.log(chalk.red(`Cloud
|
|
33490
|
+
console.log(chalk.red(`Cloud query failed (${res.status}): ${body}`));
|
|
33491
33491
|
process.exit(1);
|
|
33492
33492
|
}
|
|
33493
33493
|
const result = await res.json();
|
|
@@ -33514,9 +33514,9 @@ async function loadCloudToken() {
|
|
|
33514
33514
|
return null;
|
|
33515
33515
|
}
|
|
33516
33516
|
}
|
|
33517
|
-
program.command("
|
|
33517
|
+
program.command("query <selector>").description("Query context from your vault or from PromptOwl cloud packs").option("--json", "Output as JSON").action(async (selector, opts) => {
|
|
33518
33518
|
if (selector.startsWith("@")) {
|
|
33519
|
-
await
|
|
33519
|
+
await queryFromCloud(selector, opts);
|
|
33520
33520
|
return;
|
|
33521
33521
|
}
|
|
33522
33522
|
const storage = getStorage();
|