superlore-cli 0.4.1 → 0.4.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +56 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ declare function serializeSuperloreJson(config: SuperloreJson): string;
|
|
|
87
87
|
declare function resolveMcpPath(config: SuperloreJson): string | undefined;
|
|
88
88
|
|
|
89
89
|
/** The CLI version, kept in sync with package.json at build time. */
|
|
90
|
-
declare const VERSION = "0.4.
|
|
90
|
+
declare const VERSION = "0.4.3";
|
|
91
91
|
/** Build the argument parser. Exported for tests; `run()` wires it to argv. */
|
|
92
92
|
declare function buildCli(argv?: readonly string[]): cac.CAC;
|
|
93
93
|
/** Parse argv and dispatch. Reports unknown commands and unexpected errors cleanly. */
|
package/dist/index.js
CHANGED
|
@@ -2010,6 +2010,61 @@ export const source = loader({
|
|
|
2010
2010
|
source: docs.toFumadocsSource(),
|
|
2011
2011
|
plugins: [lucideIconsPlugin()],
|
|
2012
2012
|
});
|
|
2013
|
+
`
|
|
2014
|
+
);
|
|
2015
|
+
write(
|
|
2016
|
+
"app/api/search/route.ts",
|
|
2017
|
+
`import { source } from "@/lib/source";
|
|
2018
|
+
import { createFromSource } from "superlore/search";
|
|
2019
|
+
|
|
2020
|
+
export const { GET } = createFromSource(source);
|
|
2021
|
+
`
|
|
2022
|
+
);
|
|
2023
|
+
write(
|
|
2024
|
+
"CLAUDE.md",
|
|
2025
|
+
`# CLAUDE.md \u2014 ${config.name}
|
|
2026
|
+
|
|
2027
|
+
This repo is a **superlore** knowledge base: author once in MDX, and humans get a clean visual site
|
|
2028
|
+
while agents read the same structured content over MCP. **One corpus. Humans and agents.**
|
|
2029
|
+
|
|
2030
|
+
## Author in superlore MDX \u2014 not raw markdown
|
|
2031
|
+
|
|
2032
|
+
When you create or edit anything in \`content/docs/\`, **use superlore's dual-representation
|
|
2033
|
+
components** wherever one fits. Each renders beautifully for humans AND serializes to typed data the
|
|
2034
|
+
MCP serves \u2014 so a diagram is never a flat picture an agent has to guess at; the agent gets the data
|
|
2035
|
+
behind it. Default to a component over plain prose, a bullet list, or an ASCII diagram:
|
|
2036
|
+
|
|
2037
|
+
- **Canvas** (a fenced \`\`\`superlore-canvas JSON block) \u2014 architecture, system maps, request flows,
|
|
2038
|
+
decision flows. The agent reads the typed { nodes, edges, groups } graph.
|
|
2039
|
+
- **Timeline / Schedule** \u2014 dated milestones, roadmaps, history, on-call.
|
|
2040
|
+
- **Board** \u2014 now / next / later, kanban.
|
|
2041
|
+
- **Decision** \u2014 architecture decision records (context \xB7 decision \xB7 consequences).
|
|
2042
|
+
- **Table / Comparison** \u2014 structured rows, option/criteria matrices.
|
|
2043
|
+
- **Roster / EntityCard** \u2014 people, teams, services, any entity.
|
|
2044
|
+
- **Checklist / Steps** \u2014 runbooks, procedures, onboarding.
|
|
2045
|
+
- **Releases** \u2014 changelog, version history.
|
|
2046
|
+
- **KeyFacts \xB7 StatGrid \xB7 FeatureList \xB7 MetaBar \xB7 PageHero \xB7 SectionHead** \u2014 editorial structure.
|
|
2047
|
+
|
|
2048
|
+
## Look up patterns over MCP
|
|
2049
|
+
|
|
2050
|
+
The superlore docs are available to you as an MCP server (\`superlore-docs\`, registered by the
|
|
2051
|
+
superlore Claude plugin). Use it for exact component props, the full Canvas vocabulary, and authoring
|
|
2052
|
+
patterns \u2014 \`search\`, \`get_page\`, \`list\`, \`navigate\`, \`get_component_data\`. Full reference:
|
|
2053
|
+
https://superlore.vercel.app/docs. Don't guess a component's props \u2014 query the MCP or the docs.
|
|
2054
|
+
|
|
2055
|
+
## Layout
|
|
2056
|
+
|
|
2057
|
+
- \`content/docs/**/*.mdx\` \u2014 the corpus. A \`meta.json\` per folder sets nav order, title, and icon.
|
|
2058
|
+
- \`superlore.json\` \u2014 KB config (type, MCP, auth). \`app/api/[transport]/route.ts\` \u2014 the MCP endpoint.
|
|
2059
|
+
- \`/\` redirects to \`/docs\` \u2014 a superlore KB *is* its docs.
|
|
2060
|
+
|
|
2061
|
+
## Run
|
|
2062
|
+
|
|
2063
|
+
- \`superlore dev\` \u2014 preview locally \xB7 \`superlore build\` \u2014 production build.
|
|
2064
|
+
- \`superlore connect\` \u2014 install the editor extension for the live dual-view preview + comments.
|
|
2065
|
+
|
|
2066
|
+
**The contract:** every component must render for humans *and* serialize for agents. Keep it \u2014 it's
|
|
2067
|
+
the whole point.
|
|
2013
2068
|
`
|
|
2014
2069
|
);
|
|
2015
2070
|
writeContent(write, config);
|
|
@@ -2424,7 +2479,7 @@ function printNextSteps(root, config) {
|
|
|
2424
2479
|
}
|
|
2425
2480
|
|
|
2426
2481
|
// src/index.ts
|
|
2427
|
-
var VERSION = "0.4.
|
|
2482
|
+
var VERSION = "0.4.3";
|
|
2428
2483
|
function buildCli(argv = process3.argv) {
|
|
2429
2484
|
const cli = cac("superlore");
|
|
2430
2485
|
cli.command("init [dir]", "Scaffold a new superlore knowledge base").option("--name <name>", "KB name").option("--type <type>", "KB type: company-kb | product-docs | personal-kb").option("--auth", "Enable the Google SSO auth gate").option("--no-auth", "Disable the auth gate").option("--allowed-domain <domain>", "Restrict SSO to one email domain (implies --auth)").option("--accent <color>", "Brand accent colour (any CSS colour)").option("--no-mcp", "Disable the MCP endpoint (on by default)").option("--connect", "Install the editor extension after scaffolding (skip the prompt)").option("--no-connect", "Don't set up the editor extension").option("-y, --yes", "Skip prompts; use flags + defaults").example("superlore init my-kb --type product-docs").example("superlore init acme --type company-kb --auth --allowed-domain acme.com").example("superlore init me --type personal-kb").action(
|
package/package.json
CHANGED