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

@ariska138/stepcode

v1.1.5

Published

Step by step code manipulation CLI tool

Readme

StepCode

A step-by-step code manipulation CLI tool that helps developers generate and modify code, files, folders, and run commands in a project.

Installation

npm install stepcode -g

Features

  • File Operations:

    • Create, delete, move, and rename files
    • Create, delete, move, and rename folders
    • Set or update file contents
    • Find and modify specific content in files
    • Smart content matching (ignores extra whitespace, tabs, and newlines)
  • Command Operations:

    • Run shell commands
    • Interactive command confirmation

Usage

Create a instruction.builder.json file in your project root with your desired steps. You can have multiple .builder.json files for different purposes.

Basic Example

[
  {
    "action": "create-folder",
    "path": "src/components",
    "description": "Create components directory"
  },
  {
    "action": "create-file",
    "path": "src/components/Button.tsx",
    "content": "export const Button = () => {\n  return <button>Click me</button>\n}",
    "description": "Create Button component"
  }
]

Running the Tool

stepcode

The CLI will:

  1. Look for .builder.json files in the current directory
  2. If only instruction.builder.json exists, use it automatically
  3. If multiple builder files exist, prompt you to select one
  4. Ask whether to run steps manually or automatically

Available Actions

File Operations

Create File

{
  "action": "create-file",
  "path": "path/to/file.txt",
  "content": "File content here",
  "description": "Create new file"
}

Delete File

{
  "action": "delete-file",
  "path": "path/to/file.txt",
  "description": "Delete file"
}

Move File

{
  "action": "move-file",
  "path": "original/path/file.txt",
  "newPath": "new/path/file.txt",
  "description": "Move file to new location"
}

Rename File

{
  "action": "rename-file",
  "path": "path/file.txt",
  "newPath": "path/newname.txt",
  "description": "Rename file"
}

Content Operations

Set Content

{
  "action": "set-content",
  "path": "path/to/file.txt",
  "content": "This will replace the entire file content",
  "description": "Replace file content"
}

Find and Update Content

{
  "action": "find-content-to-update",
  "path": "path/to/file.txt",
  "searchText": "text to find",
  "replaceWith": "replacement text",
  "description": "Update specific content"
}

Find and Add Content

{
  "action": "find-content-to-add",
  "path": "path/to/file.txt",
  "searchText": "text to find",
  "content": "content to add after found text",
  "description": "Add content after specific text"
}

Find and Delete Content

{
  "action": "find-content-to-delete",
  "path": "path/to/file.txt",
  "searchText": "text to delete",
  "description": "Delete specific content"
}

Folder Operations

Create Folder

{
  "action": "create-folder",
  "path": "path/to/folder",
  "description": "Create new folder"
}

Delete Folder

{
  "action": "delete-folder",
  "path": "path/to/folder",
  "description": "Delete folder"
}

Move Folder

{
  "action": "move-folder",
  "path": "original/path",
  "newPath": "new/path",
  "description": "Move folder to new location"
}

Rename Folder

{
  "action": "rename-folder",
  "path": "path/folder",
  "newPath": "path/newname",
  "description": "Rename folder"
}

Command Operations

Run Command

{
  "action": "run-command",
  "command": "npm install",
  "description": "Install dependencies"
}

Confirm Command

{
  "action": "confirm-command",
  "command": "git status",
  "confirmationMessage": "Check git status?",
  "description": "Check git status with confirmation"
}

Special Features

Smart Content Matching

When using content operations (find-content-to-update, find-content-to-delete, find-content-to-add), the tool uses smart matching that:

  • Ignores extra whitespace
  • Ignores tabs and newlines
  • Treats multiple spaces as a single space
  • Preserves original formatting when making changes

This makes it easier to match content without worrying about exact whitespace matching.

Running Modes

The tool supports two running modes:

  1. Step by Step (Manual)

    • Review each step before execution
    • Choose to execute, skip, or view details of each step
    • Perfect for learning and careful execution
  2. All at Once (Automatic)

    • Executes all steps automatically
    • Faster for known and tested operations
    • Good for automation and scripting

Error Handling

The tool provides:

  • Clear error messages
  • Step-by-step feedback
  • Progress indicators
  • Confirmation for destructive operations

Contributing

Issues and pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

UNLICENSED

Author

Finlup Engineering Team [email protected]

Donate

:coffee: Donasi Coffee 🍕 Donasi Pizza