@narrative-os/cli 0.1.0 → 0.1.2

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 ADDED
@@ -0,0 +1,58 @@
1
+ # @narrative-os/cli
2
+
3
+ AI-native narrative engine for long-form story generation.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @narrative-os/cli
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Configure your LLM provider
15
+ nos config
16
+
17
+ # Create a new story
18
+ nos init --title "My Adventure" --chapters 10
19
+
20
+ # Generate chapters
21
+ nos generate <story-id>
22
+
23
+ # Or auto-generate all remaining chapters
24
+ nos continue <story-id>
25
+ ```
26
+
27
+ ## Commands
28
+
29
+ | Command | Description |
30
+ |---------|-------------|
31
+ | `nos init` | Create a new story |
32
+ | `nos generate <id>` | Generate next chapter |
33
+ | `nos continue <id>` | Auto-generate remaining chapters |
34
+ | `nos status [id]` | View story status |
35
+ | `nos list` | List all stories |
36
+ | `nos read <id> [chapter]` | Read chapter content |
37
+ | `nos bible <id>` | View story bible |
38
+ | `nos memories <id>` | Search narrative memories |
39
+ | `nos validate <id>` | Validate story consistency |
40
+ | `nos export <id>` | Export story to markdown |
41
+ | `nos delete <id>` | Delete a story |
42
+ | `nos config` | Configure LLM settings |
43
+
44
+ ## Features
45
+
46
+ - **Persistent Memory**: Never forgets what happened 50 chapters ago
47
+ - **Logical Consistency**: Enforces facts and character continuity
48
+ - **World Simulation**: Characters have goals and act autonomously
49
+ - **Tension Control**: Manages narrative arc and pacing
50
+ - **Multi-Story Support**: Work on multiple stories simultaneously
51
+
52
+ ## Documentation
53
+
54
+ For full documentation, visit: https://github.com/liwonder/NARRITIVE_OS
55
+
56
+ ## License
57
+
58
+ MIT
@@ -3,7 +3,7 @@ interface Config {
3
3
  apiKey: string;
4
4
  model: string;
5
5
  }
6
- export declare function configCommand(): Promise<void>;
6
+ export declare function configCommand(showOnly?: boolean): Promise<void>;
7
7
  export declare function getConfig(): Config | null;
8
8
  export declare function applyConfig(): void;
9
9
  export {};
@@ -31,9 +31,26 @@ function saveConfig(config) {
31
31
  (0, fs_1.mkdirSync)(CONFIG_DIR, { recursive: true });
32
32
  (0, fs_1.writeFileSync)(CONFIG_FILE, JSON.stringify(config, null, 2));
33
33
  }
34
- async function configCommand() {
35
- const { select, password } = await import('@inquirer/prompts');
34
+ async function configCommand(showOnly = false) {
36
35
  const existing = loadConfig();
36
+ // Show current configuration
37
+ if (showOnly) {
38
+ if (!existing) {
39
+ console.log('āŒ No configuration found.');
40
+ console.log('Run: nos config to set up your LLM provider');
41
+ return;
42
+ }
43
+ console.log('\nšŸ“‹ Current Configuration:');
44
+ console.log('========================');
45
+ console.log(`Provider: ${existing.provider}`);
46
+ console.log(`Model: ${existing.model}`);
47
+ console.log(`API Key: ${existing.apiKey ? 'āœ… Set (' + '*'.repeat(Math.min(existing.apiKey.length - 4, 8)) + existing.apiKey.slice(-4) + ')' : 'āŒ Not set'}`);
48
+ console.log('');
49
+ console.log(`Config file: ${CONFIG_FILE}`);
50
+ return;
51
+ }
52
+ // Interactive configuration
53
+ const { select, password } = await import('@inquirer/prompts');
37
54
  const provider = await select({
38
55
  message: 'Select LLM provider:',
39
56
  choices: PROVIDERS.map(p => ({ name: p.name, value: p.value })),
@@ -51,7 +68,7 @@ async function configCommand() {
51
68
  });
52
69
  const config = { provider: provider, model, apiKey };
53
70
  saveConfig(config);
54
- console.log(`\nConfiguration saved for ${providerInfo.name}`);
71
+ console.log(`\nāœ… Configuration saved for ${providerInfo.name}`);
55
72
  console.log(`Model: ${model}`);
56
73
  }
57
74
  function getConfig() {
package/dist/index.js CHANGED
@@ -29,7 +29,10 @@ if (process.argv.length <= 2) {
29
29
  program
30
30
  .command('config')
31
31
  .description('Configure LLM provider and API key')
32
- .action(config_js_1.configCommand);
32
+ .option('-s, --show', 'Show current configuration')
33
+ .action((options) => {
34
+ (0, config_js_1.configCommand)(options.show);
35
+ });
33
36
  // Story Management
34
37
  program
35
38
  .command('init')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative-os/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "AI-native narrative engine for long-form story generation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {