npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@algorandfoundation/algo-docs-sync

v1.5.0

Published

Documentation generation tools for AlgoKit TypeScript projects

Downloads

271

Readme

@algorandfoundation/algo-docs-sync

End-to-end documentation tooling for AlgoKit projects. Install once, pick the documentation generator you need, and every build copies your guides, invokes the configured generator (TypeDoc today, more stacks tomorrow), writes manifest.json, and publishes the result to a dedicated docs branch.


1. Install & authenticate

  1. Add the tool as a dev dependency:
    npm install --save-dev @algorandfoundation/algo-docs-sync

2. Scaffold the repo

Run the initializer from your project root and choose a generator (required). For TypeScript repos you’ll typically pass typedoc; future generators (e.g., Python/Sphinx) will expose their own templates.

npx algo-docs init --generator typedoc

This command:

  • Drops docs-config.json (guide + API glob rules plus a required generator field) and typedoc.json when using the typedoc generator.
  • Copies .github/workflows/build-docs.yml, pre-wired with installation, build, manifest, and deploy steps.
  • Creates a docs/ folder if it doesn’t exist so you can start committing guide markdown right away.

Commit the generated files (docs-config.json, typedoc.json, .github/workflows/build-docs.yml) before moving on.


3. What the pipeline does

docs-config.json declares a generator and a basePath. Every run of npx algo-docs build dispatches to the selected generator. For the typedoc generator the flow is:

  1. Build – run TypeDoc (with typedoc-plugin-markdown) to generate API docs at basePath/api.
  2. Stagenpx algo-docs stage reads from basePath/guides and basePath/api, applies include/exclude filters, and copies the results to docs-publish/<version>.
  3. Manifestnpx algo-docs manifest writes basePath/manifest.json including repo metadata, git info, and tool versions.
  4. Publish – the workflow clones the current docs-dist branch into docs-publish, stages the filtered docs, and pushes the whole tree back via peaceiris/actions-gh-pages.
    • Manual dispatches refresh only docs-dist/latest.
    • Release events drop the new build into docs-dist/v<tag> (e.g., docs-dist/v1.3.5) and also refresh docs-dist/latest so you always have a rolling view and versioned snapshots.

Developers can explore the generated docs locally by opening the basePath/ directory, while CI keeps the branch copy in sync.


4. Wire up GitHub Actions

The initializer drops the build-docs.yml workflow into the .github.workflows/ folder.

Key secrets:

  • GITHUB_TOKEN (provided automatically) – used by peaceiris/actions-gh-pages to push to docs-dist. Ensure the repo’s Workflow permissions allow write access.

Once merged into your default branch, the workflow will:

  • Update docs-dist/latest on pushes, pull requests, and manual dispatches.
  • Create docs-dist/<release-tag> when you publish a GitHub Release.

You can download the generated artifact (docs-dist.zip) from each run if you need to inspect the raw files.


5. Local commands

  • npx algo-docs validate – schema-check docs-config.json.
  • npx algo-docs build – run TypeDoc to generate API docs at basePath/api. Pass --generator <name> to override the generator value declared in docs-config.json.
  • npx algo-docs stage – copy and filter docs from basePath/guides and basePath/api to docs-publish/<version>. Use --version <tag> for versioned releases and --update-latest to also update the latest folder.
  • npx algo-docs manifest – write basePath/manifest.json with repo metadata, git info, and tool versions.
  • npx algo-docs migrate – update an existing docs-config.json to the latest schema version.

These commands respect --config, --verbose, and --quiet flags so you can customize paths or diagnostics when experimenting locally.


7. Generators

The CLI ships with a pluggable generator system:

| Name | Description | | -------- | ---------------------------------------------------------------- | | typedoc | Builds API markdown from TypeScript entry points using TypeDoc and typedoc-plugin-markdown. |

Set the generator in docs-config.json (e.g., "generator": "typedoc") or via --generator on the CLI. Additional stacks (Python/Sphinx, Rust/mdBook, etc.) can plug in without changing the shared workflow—just ship a new generator package and register it.


6. Where your docs live

| Location | When it updates | What it contains | | --------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | basePath/ (workspace) | After npx algo-docs build locally or in CI | Working copy of guides (at basePath/guides) and API markdown (at basePath/api). Safe to inspect or serve locally. | | docs-publish/ (workspace) | After npx algo-docs stage | Filtered docs ready for publishing. Contains versioned folders (e.g., latest, v1.2.0). | | docs-dist/latest (branch) | Manual dispatches and releases | Rolling view of the most recently published docs. Release runs refresh this folder in addition to their versioned snapshot. | | docs-dist/<tag> (branch) | GitHub Release published | Immutable snapshot of the docs that correspond to that package version (e.g., v2.5.0). Useful for historic doc sets or version switchers. |

Publish targets can be adjusted by editing .github/workflows/build-docs.yml, but the defaults above cover most repos: "latest" for ongoing work, and "vX.Y.Z" for tagged releases.