new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

LangChain & LangGraph · all subjects

out of scope

59 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

OpenWiki update commands

Bare 'openwiki --init' and 'openwiki --update' run in code mode. Use 'openwiki personal --init' or 'openwiki personal --update' for the personal wiki.

OpenWiki supported model providers

OpenWiki supports OpenAI, Anthropic, Gemini, Bedrock, OpenRouter, GitHub Copilot, and other providers out of the box.

OpenWiki personal brain sources

OpenWiki personal mode can build a local wiki from git repos, Custom MCP, Gmail, Notion, web search, Hacker News, and X/Twitter.

OpenWiki LangSmith tracing support

OpenWiki supports tracing with LangSmith and can trace documentation runs with LangSmith.

OpenWiki purpose and audience

OpenWiki is an open source CLI that writes and maintains a Markdown wiki about a codebase or personal knowledge. The wiki captures details such as architecture, integrations, evals, and workflows so coding agents can use it as durable context instead of rediscovering the repository on every task. The primary audience is agents, though humans can browse the same Markdown.

OpenWiki token efficiency benefit

OpenWiki makes agent work faster and cheaper in tokens because agents read a curated wiki first, then inspect source only where they need more detail.

OpenWiki installation and initialization

Install OpenWiki with 'npm install -g openwiki'. Initialize documentation for the current repository with 'openwiki --init'.

OpenWiki code mode

Code mode (default) is invoked with the command 'openwiki' or 'openwiki code'. It outputs documentation to 'openwiki/' in the current repository. Use code mode when you want repository context and documentation for coding agents.

OpenWiki personal mode

Personal mode is invoked with the command 'openwiki personal'. It outputs to '~/.openwiki/wiki'. Use personal mode when you want a local personal brain from configured sources.

OpenWiki auth configure command

The openwiki auth configure <provider> command regenerates connector config from saved auth environment variables. The --force flag can be used to force regeneration.

OpenWiki auth tools command

The openwiki auth tools <provider> command lists live MCP tools for MCP-backed providers.

OpenWiki ingest command

The openwiki ingest command runs source-specific connector ingestion. It accepts a source name, source-instance identifier, or 'all' to ingest all sources.

OpenWiki ngrok command

The openwiki ngrok start command sets up an HTTPS tunnel for Slack OAuth. It accepts optional url and --port parameters, and saves OPENWIKI_HTTPS_OAUTH_REDIRECT_URI.

OpenWiki cron commands for macOS

On macOS, OpenWiki can manage optional connector schedules as user LaunchAgents that periodically refresh sources. Available commands are: openwiki cron list, openwiki cron pause <source|all>, openwiki cron resume <source|all>, and openwiki cron delete <source|all>. The cron delete command removes the saved schedule and unloads its LaunchAgent but does not remove auth, connector config, raw data, or wiki content.

OpenWiki --init and --update flags

The --init flag generates initial documentation in code mode by default, regenerates the repository wiki from scratch while preserving openwiki/INSTRUCTIONS.md when re-run, and in a TTY without --print streams agent output and exits automatically on success. The --update flag updates existing documentation in code mode by default and also streams agent output and exits automatically on success in a TTY without --print. The --init and --update flags cannot be combined.

OpenWiki slash commands in interactive mode

In interactive chat mode, OpenWiki supports the following slash commands: /api-key (update current provider API key with masked prompt), /langsmith-key (update or clear LangSmith tracing credentials with masked prompt), /provider and /model (change provider or model for the session, persisted to ~/.openwiki/.env), /effort (set reasoning effort for supported OpenAI GPT-5.6 and NVIDIA NIM models, or /effort default to restore provider default), /init and /update (launch init or update from the session), and /exit (exit the app).

OpenWiki --language flag

The --language flag (short form: -l) generates wiki documentation in a specified BCP-47 locale, such as ko, zh-CN, or pt-BR. Unrecognized values are rejected.

OpenWiki mode flag options

The --mode flag accepts two values: personal for personal brain or code for repository docs.

OpenWiki core command modes

OpenWiki is a single binary with three main modes: interactive chat (default), one-shot print mode with -p flag, and personal mode. Interactive chat stays open for follow-ups unless --print is used. The --print flag runs once, prints the final assistant output, and exits.

OpenWiki modelId flag

The --modelId (or --model-id) flag allows choosing a model ID for the run.

OpenWiki telemetry-file flag

The --telemetry-file flag accepts a path parameter and writes the telemetry payload for the run to a local JSON file.

OpenWiki visualize command

The openwiki visualize command visualizes the generated wiki as an interactive node graph and live Markdown reader, or exports a static site for hosting. It accepts optional arguments for the wiki path (defaults to current wiki), --port flag to specify a port number (example: 4400), --no-open flag to prevent automatically opening the browser, and --export flag followed by a path to export a static site.

OpenWiki coding-agent integrations

OpenWiki can be installed into host coding agents (codex, claude, opencode, cursor) so the host's model and repository tools drive generation while OpenWiki owns the durable page-job lifecycle. Commands include: openwiki integrations list to view installed integrations, openwiki integrations install <name> to install an integration, and openwiki integrations uninstall <name> to remove an integration. The --force and --project flags are available for install commands.

OpenWiki auth command

The openwiki auth command lists supported auth providers and their status. Browser OAuth providers include gmail, notion, slack, and x. Tokens are saved to ~/.openwiki/.env and connector config is created when possible.

OpenWiki auth helper commands

Advanced retry helpers are available: openwiki auth configure <provider> and openwiki auth tools <provider>.

Personal mode builds local wiki from configured sources

Personal mode builds a local personal brain wiki in ~/.openwiki/wiki from configured sources such as local repositories, Custom MCP, Gmail, Notion, web search, Hacker News, Slack, and X/Twitter.

OpenWiki personal mode commands

The following commands are used in personal mode: openwiki personal (run personal mode), openwiki personal --init (initialize), openwiki personal --update (refresh from configured connectors), openwiki personal --update "Refresh the wiki from configured connectors" (update with description).

Override OpenWiki state directory

To store personal wiki state somewhere other than ~/.openwiki, set the OPENWIKI_CONFIG_DIR environment variable.

First-run onboarding stores preferences

OpenWiki stores onboarding preferences (selected template, connected sources, per-source ingestion notes, and cron schedules) in ~/.openwiki/onboarding.json. Global personal wiki instructions are saved separately in ~/.openwiki/INSTRUCTIONS.md.

OpenWiki schedule is optional cron for connector

A schedule is an optional cron expression for a connector source, such as refreshing Gmail or web search on a recurring interval.

macOS LaunchAgents for OpenWiki schedules

On macOS, OpenWiki can install supported schedules as user LaunchAgents under ~/Library/LaunchAgents/. Those jobs run openwiki --update --print and write logs under ~/.openwiki/logs/.

OpenWiki connector data storage structure

During an ingestion run, connector tools write raw data and manifests under ~/.openwiki/connectors/<connector>/raw/, then source-specific agent runs update the wiki from those local files.

OpenWiki connector secrets storage

Connector secrets are referenced by environment variable name and stored in ~/.openwiki/.env. Connector config files should never contain raw secret values.

OpenWiki built-in sources and credentials

Built-in sources are: custom-mcp (no credentials required by default, connects to HTTP or stdio MCP servers with read-only tools), git-repo (local paths, reads repositories and writes manifests), x (OAuth user-context credentials, accesses home timeline, user posts, mentions, bookmarks, list posts via X API), notion (Notion OAuth via hosted MCP), google (Gmail OAuth, fetches recent mail via Gmail API after openwiki auth gmail), web-search (TAVILY_API_KEY, uses Tavily through LangChain), hackernews (no credentials, public feed and search APIs), slack (Slack app client credentials + OAuth, requires HTTPS callback setup).

OpenWiki supports multiple instances of same source

The same source can be configured more than once. For example, add one web search source for AI research and another for NBA news. OpenWiki stores them as separate instances such as web-search-1 and web-search-2.

OpenWiki authentication commands

Run openwiki auth notion, openwiki auth gmail, openwiki auth x, or openwiki auth slack to run local browser OAuth flows for providers that require it. OpenWiki saves returned tokens to ~/.openwiki/.env, creates connector config when possible, and discovers MCP tools for MCP-backed providers.

OpenWiki authentication provider requirements

Slack and Gmail require app client credentials to already be set in ~/.openwiki/.env. Notion uses dynamic client registration for hosted MCP. X uses OAuth 2.0 with PKCE. After openwiki auth gmail, the Google connector can ingest Gmail directly with no MCP transport setup.

OpenWiki ingest commands

Pull raw data into ~/.openwiki/connectors/ and synthesize updates into the personal wiki using: openwiki ingest all, openwiki ingest web-search, or openwiki ingest web-search-2. You can also refresh from chat or with openwiki personal --update after sources are configured.

OpenWiki Slack OAuth HTTPS setup

Slack OAuth can require an HTTPS redirect URL. Run openwiki ngrok start or openwiki ngrok start https://your-domain.ngrok.app to set up. OpenWiki saves OPENWIKI_HTTPS_OAUTH_REDIRECT_URI and prints the callback URL to register in Slack. X/Twitter and Gmail auth ignore that HTTPS override and keep using the local callback at http://127.0.0.1:53682/callback by default.

OpenWiki credential storage location and permissions

OpenWiki stores secrets under directory ~/.openwiki (mode 0o700) and file ~/.openwiki/.env (mode 0o600). Common connector-related keys include Gmail, Notion, Slack, and X OAuth tokens, plus TAVILY_API_KEY for web search.

OpenWiki OAuth callback configuration environment variables

Optional OAuth callback settings are: OPENWIKI_OAUTH_CALLBACK_PORT (local callback port) and OPENWIKI_HTTPS_OAUTH_REDIRECT_URI (Slack HTTPS callback URL).

OpenWiki cron schedule management commands

On macOS, manage connector schedules with: openwiki cron list (show schedules), openwiki cron pause <source|all> (pause schedules), openwiki cron resume <source|all> (resume schedules), openwiki cron delete <source|all> (remove schedules).

OpenWiki cron delete behavior

openwiki cron delete removes the saved schedule for a source from ~/.openwiki/onboarding.json and unloads its LaunchAgent. It does not remove auth, connector config, raw data, or wiki content.

OpenWiki scheduled updates with GitHub Actions, GitLab CI, Bitbucket Pipelines

OpenWiki can refresh repository documentation on a schedule and open a pull request or merge request when the wiki changes. Example workflows are available in the OpenWiki repository at https://github.com/langchain-ai/openwiki/tree/main/examples.

OpenWiki CI update command

Use the command `openwiki code --update --print` to run repository documentation updates in CI. The --update flag creates the initial openwiki/ docs if they do not exist yet, provided the workflow supplies required provider and model environment variables. The --init command is not needed in CI.

OpenWiki CI environment variables required

Provide the following as repository secrets or CI variables: Provider API key (or Copilot OAuth token/cloud credentials for keyless providers), OPENWIKI_PROVIDER, OPENWIKI_MODEL_ID, optional LANGSMITH_API_KEY for tracing, and optional OPENWIKI_LANGSMITH_API_KEY when the repository uses the LangSmith connector.

OpenWiki workflow file destinations

GitHub Actions example openwiki-update.yml should be placed at .github/workflows/openwiki-update.yml. GitLab CI example openwiki-update.gitlab-ci.yml should be placed at .gitlab-ci.yml or included from an existing pipeline. Bitbucket Pipelines example openwiki-update.bitbucket-pipelines.yml should be placed at bitbucket-pipelines.yml, then the openwiki-update custom pipeline should be scheduled.

OpenWiki CI workflow included files

The scheduled workflow includes generated wiki files and Claims under openwiki/.claims/, AGENTS.md, CLAUDE.md, and the workflow itself in the documentation pull request when those files change.

OpenWiki resumable generation with persistence files

Repository generation is resumable on persistent workspaces through openwiki/.run.json and openwiki/.page-manifest.json. Ephemeral CI runners start fresh after failure unless their workspace is preserved. OpenWiki can still publish partial progress when a run fails after some pages complete.

OpenWiki empty update behavior

A clean --update run skips model work and leaves wiki content untouched while refreshing openwiki/.last-update.json so freshness checks reflect that the check ran. If the wiki Markdown and Claims do not change, CI does not open a pull request.

OpenWiki telemetry in CI

Scheduled and CI runs send anonymous reliability telemetry under a shared CI identifier. To disable telemetry in CI, set OPENWIKI_TELEMETRY_DISABLED=1 environment variable.

Disable OpenWiki telemetry

Disable telemetry collection by setting export OPENWIKI_TELEMETRY_DISABLED=1 or export DO_NOT_TRACK=1. To disable permanently, add OPENWIKI_TELEMETRY_DISABLED=1 to ~/.openwiki/.env. In CI, set it in the workflow environment. To inspect exactly what a run would send, add --telemetry-file=<path> to any run.

Wiki instructions files for OpenWiki

OpenWiki reads wiki instruction files during runs: openwiki/INSTRUCTIONS.md (shared, user-authored brief for repository documentation scope and priorities in code mode) and ~/.openwiki/INSTRUCTIONS.md (global personal wiki instructions in personal mode). These files can be edited manually or through OpenWiki chat. Normal --init and --update runs do not rewrite these files.

Agent instruction files AGENTS.md and CLAUDE.md

On each code run, OpenWiki maintains AGENTS.md and CLAUDE.md at the repository root. It creates the file if it does not exist and rewrites only the <!-- OPENWIKI:START --> … <!-- OPENWIKI:END --> block when the file already exists, leaving the rest of the content untouched. That block instructs coding agents to consult the generated wiki when they need repository context.

OpenWiki local configuration directory paths

Both code and personal mode store machine-local state under ~/.openwiki/ by default. The following paths are used: ~/.openwiki/.env (provider config, API keys, and connector OAuth tokens), ~/.openwiki/openwiki.sqlite (conversation checkpoint database), ~/.openwiki/install-id (random install ID for anonymous telemetry), ~/.openwiki/wiki/ (personal mode wiki output), ~/.openwiki/INSTRUCTIONS.md (personal wiki brief), ~/.openwiki/onboarding.json (personal onboarding preferences and connector schedules), and ~/.openwiki/connectors/ (connector raw data and config, used for personal sources and can cache raw data from code-mode LangSmith ingestion). Code-mode repository artifacts live in the project under openwiki/, not under ~/.openwiki/.

Override OpenWiki state directory with OPENWIKI_CONFIG_DIR

Set the OPENWIKI_CONFIG_DIR environment variable before starting OpenWiki to use a different writable directory, such as a mounted container volume. Example: OPENWIKI_CONFIG_DIR=/data/openwiki openwiki personal --init. The override selects a separate state directory. OpenWiki does not move or delete an existing ~/.openwiki directory. To preserve any state, copy it yourself and point the variable at a dedicated directory because OpenWiki restricts its permissions for the current user.

.openwikiignore file for excluding paths

Create a .openwikiignore file at the repository root to exclude private, generated, or irrelevant paths from OpenWiki documentation runs. The syntax and behavior are described in the Code mode documentation.

OpenWiki telemetry collection

OpenWiki collects anonymous, aggregate usage data by default on a single openwiki_run event, keyed by a random install ID stored in ~/.openwiki/install-id. Collected data includes: every recorded run's command (init / update) and outcome (success / failure / no-op), plus a coarse error category on failure (never the error message), and at setup on init only: brain mode (code / personal), model provider, and configured connector names (never their contents). Interactive chat, auth, and ingest are not recorded. Never collected: file contents, repository data or names, credentials, prompts, model output, connector payloads, error messages, file paths, URLs, model IDs, run duration, IP address, or personal information. GeoIP enrichment is disabled.

OpenWiki purpose for coding agents

OpenWiki writes and maintains a Markdown wiki for a codebase or personal knowledge. Coding agents use that wiki as durable context so they spend less time and fewer tokens rediscovering architecture, integrations, and other repository details. Humans can read the same docs, but agents are the primary audience.

Give your agent this brain