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

@domoinc/da

v2.2.0

Published

Generators for Domo's Vite template

Readme

@domoinc/da

Generator CLI for Domo's React template using Vite.

Installation

Install the package globally to use the da command anywhere:

Recommended (pnpm):

pnpm add -g @domoinc/da

Alternative options:

npm install -g @domoinc/da
# or
yarn global add @domoinc/da

Check installation:

da --version

Commands

da new <name>                           # Generate a new DomoApp [aliases: n]
da manifest [identifier] [description]  # Adds a new manifest override [aliases: m]
da apply-manifest [id]                  # Applies manifest overrides [aliases: am]
da generate [template]                  # Generates code from templates [aliases: g]

da new <name>

Generate a new DomoApp from the Vite React template.

Usage:

da new my-app
# or with alias
da n my-app

Options:

  • --force, -f - Overwrite directory if it already exists
  • --merge, -m - Merge template into existing directory (renames conflicting files)
  • --template, -t - Specify a custom template (npm package, GitHub repo, or local path)

Examples:

# Create a new app
da new my-domo-app

# Overwrite existing directory
da new my-domo-app --force

# Merge template into existing directory
da new my-domo-app --merge

# Use a custom template
da new my-domo-app --template @your-org/custom-template
da new my-domo-app --template owner/repo
da new my-domo-app --template ~/path/to/local-template

Merge Behavior:

When using --merge, the template files are merged into an existing directory:

  • Files that don't conflict are copied normally
  • Files that already exist are renamed with a (N) suffix before the extension (e.g., package.jsonpackage(1).json)
  • Directories are merged recursively
  • A list of renamed files is displayed after the merge completes

This is useful for adding template files to an existing project without losing your current work.

The CLI will:

  1. Validate the app name
  2. Check if directory exists
  3. Prompt for package manager (pnpm recommended)
  4. Clone/copy the template
  5. Update package.json with your app name
  6. Initialize git repository
  7. Install dependencies

da manifest [identifier] [description]

Creates a new manifest override with the given identifier and description.

Arguments:

  • identifier - Key used in the manifestOverrides.json file (e.g., instance.prod, instance.dev)
  • description - Description of the overrides (helpful to include the instance URL)

Example:

da manifest instance.prod "Production asset for instance.domo.com"

da apply-manifest [id]

Applies the selected manifest overrides to the manifest at start/build time.

If you are using the Domo+Vite+React template, this is called by the serve and build processes automatically. If no id is specified, a searchable list will be provided based on the manifestOverrides.json.

Example:

da apply-manifest instance.prod

da generate [template]

Generates code based on the selected template. If no template is specified, a list will be provided.

Available templates:

Component

da generate component MyComponent
# or with alias
da g component MyComponent

Creates:

  • Component file: src/components/MyComponent/MyComponent.tsx
  • Styles: src/components/MyComponent/MyComponent.module.scss
  • Test file (optional): src/components/MyComponent/MyComponent.test.tsx
  • Storybook file (optional): src/components/MyComponent/MyComponent.stories.tsx

Reducer

da generate reducer myFeature

Creates:

  • Reducer slice: src/reducers/myFeature/slice.ts
  • Auto-imports into src/reducers/index.ts

Local Development

Prerequisites

  • Node.js >= 16.0.0
  • pnpm (recommended), npm, or yarn
  • Git

Setup

  1. Clone the repository:

    git clone <repository-url>
    cd da
  2. Install dependencies:

    pnpm install
  3. Link the CLI globally for testing:

    npm link
    # or
    pnpm link --global
  4. The da command is now available globally and points to your local development version.

Testing with a Local Template

For local development, you can point the CLI to a local template instead of cloning from GitHub:

  1. Create a .env file:

    cp .env.example .env
  2. Edit .env and set the path to your local template:

    DA_TEMPLATE_PATH=~/dev/vite-react-template
    # or use an absolute path
    DA_TEMPLATE_PATH=/Users/yourname/projects/vite-react-template
  3. Run the CLI - it will use your local template:

    da new test-app

Note: The .env file and dotenv package are only used for local development. When published to npm, end users will always use the default GitHub template.

Making Changes

  1. Make your changes to the source files in src/

  2. Test your changes:

    da new test-app
  3. The linked command will use your modified code immediately (no rebuild needed for JS changes)

Project Structure

da/
├── src/
│   ├── cli.js              # Main CLI entry point & command definitions
│   ├── plopHelper.js       # Helper for running plop actions
│   ├── create/
│   │   ├── index.js        # Logic for creating new apps
│   │   └── plop.js         # Plop config for package.json updates
│   ├── generate/
│   │   ├── index.js        # Logic for code generation
│   │   ├── plop.js         # Plop generators (component, reducer)
│   │   └── templates/      # Handlebars templates for generators
│   └── manifest/
│       ├── index.js        # Logic for manifest management
│       ├── plop.js         # Plop config for manifest setup
│       └── templates/      # Manifest templates
├── index.js                # CLI entry point (#!/usr/bin/env node)
├── package.json
└── .env.example           # Example environment config

Publishing

The package is published to npm as @domoinc/da. Only team maintainers can publish new versions.

Troubleshooting

Command not found after installation

If da command is not found after global installation:

# Check if it's installed
npm list -g @domoinc/da

# Check your PATH includes npm global bin
npm config get prefix

# Add to your PATH if needed (add to ~/.bashrc or ~/.zshrc):
export PATH="$(npm config get prefix)/bin:$PATH"

Template repository unreachable

If you see an error about the template repository:

  • Check your internet connection
  • Verify git is installed: git --version
  • Try cloning the template manually: git clone https://github.com/DomoApps/vite-react-template.git

Permission errors during installation

On macOS/Linux, you may need to use sudo:

sudo npm install -g @domoinc/da

Or configure npm to install packages globally without sudo:

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH

License

MIT

Maintainer

Domo - Developer Innovations