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 🙏

© 2026 – Pkg Stats / Ryan Hefner

slicer-copilot

v0.1.0

Published

Slicer Copilot CLI to auto-optimize Bambu Studio .3mf projects using an LLM

Readme

Slicer Copilot

AI-powered optimization for your Bambu Studio 3D printing projects.

Slicer Copilot analyzes your .3mf project files, understands your goals (like "Maximum Strength" or "Visual Quality"), and uses an LLM to tune your print settings automatically.

Features

  • Smart Analysis: Reads printer, filament, and process settings from your .3mf file.
  • Goal-Oriented: Optimize for Strength, Speed, Visual Quality, or a Custom goal.
  • Safe: Never modifies your 3D geometry. Only tunes process settings.
  • Transparent: Explains why every change is made.
  • Multi-Language: Supports English, Russian, Spanish, French, German, and Chinese.
  • CI/CD Ready: Runs interactively or in fully automated pipelines.

Getting Started

Prerequisites

  • Node.js 20 or higher.
  • An OpenAI-compatible API key (OpenAI, Anthropic via adapter, LocalLLM, etc.).

Installation

You can run the tool directly using npx or install it globally.

# Run directly
npx slicer-copilot optimize my-project.3mf

# Or install globally
npm install -g slicer-copilot

Configuration

Create a .env file in your project directory to store your API keys.

cp .env.example .env

Required variables:

OPENAI_API_KEY=sk-...

Optional variables:

OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4o  # Default: gpt-4.1-mini

Usage

Interactive Mode (Default)

Simply run the command on your file. The tool will ask you for your optimization goal.

npx slicer-copilot optimize input.3mf

Dry Run (Safe Mode)

Want to see what would change without writing a new file? Use --dry-run.

npx slicer-copilot optimize input.3mf --dry-run

Automated / Non-Interactive

For scripts or batch processing, use --non-interactive and provide an intent file.

npx slicer-copilot optimize input.3mf \
  --non-interactive \
  --intent-file intent.json

Localization

Switch the interface and AI reasoning language using --language.

npx slicer-copilot optimize input.3mf --language ru

Supported languages:

  • en (English)
  • ru (Russian)
  • es (Spanish)
  • fr (French)
  • de (German)
  • zh (Chinese)

Optimization Goals

When running interactively, you can choose from the following goals:

| Goal | Description | | :---------------------- | :--------------------------------------------------------------- | | Balanced | A good mix of speed, quality, and strength. | | Functional Strength | Prioritizes part durability and layer adhesion. | | Visual Quality | Focuses on surface finish and fine details. | | Draft / Speed | Maximizes print speed for prototypes. | | Custom | Follows your specific instructions (e.g., "Make it watertight"). |

Example Output

Here is what the tool looks like in action:

npx slicer-copilot optimize new-years-ball.3mf --output test-ny.3mf
✔ Project loaded successfully

╭ ★ Slicer Copilot ────╮
│  Project Summary     │
│  new-years-ball.3mf  │
╰──────────────────────╯
╭──────────────────────────────────┬───────────────────────────────────────────────────────────────────────────╮
│ ℹ Field                          │ → Details                                                                 │
├──────────────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
│ ◼ File                           │ new-years-ball.3mf                                                        │
├──────────────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
│ ▶ Printer                        │ Bambu Lab H2S ● 0.4mm nozzle ● Bed: Textured PEI Plate                    │
├──────────────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
│ ◉ Filament                       │ Bambu PLA Basic @BBL H2S [PLA]                                            │
├──────────────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
│ ❯ Profile                        │ 0.20mm Standard @BBL H2S                                                  │
├──────────────────────────────────┼───────────────────────────────────────────────────────────────────────────┤
│ ☰ Process                        │ Layer 0.12 mm │ Walls 2 │ Infill 5% │ gyroid                              │
╰──────────────────────────────────┴───────────────────────────────────────────────────────────────────────────╯
★ Select optimization goal (↑/↓ + Enter)

  Balanced
› Functional Strength — Maximum durability and load capacity
  Visual Quality
  Draft / Speed
  Custom


📝 Add notes about the model (geometry, material quirks, desired result)
   Press Enter to skip
›
✓ Selected: Functional Strength
✔ AI analysis complete

╭─────────────────────────────╮
│ ★ 24 Suggested Changes      │
╰─────────────────────────────╯
╭─────────────────────────────────┬─────────────────────────────┬────────────────────────────────────────────╮
│ ☰ Parameter                     │ → Change                    │ ℹ Reason                                   │
├─────────────────────────────────┼─────────────────────────────┼────────────────────────────────────────────┤
│ wall_line_count                 │ 2 → 3                       │ Increase perimeters to 3 to reinforce the  │
│                                 │                             │ shell and mounting loops without changing  │
│                                 │                             │ geometry.                                  │
├─────────────────────────────────┼─────────────────────────────┼────────────────────────────────────────────┤
│ infill_density_percent          │ 5 → 15                      │ Increase infill from 5% to 15% for better  │
│                                 │                             │ overall part strength and impact           │
│                                 │                             │ resistance.                                │
├─────────────────────────────────┼─────────────────────────────┼────────────────────────────────────────────┤
│ nozzle_temp_c                   │ 220 → 225                   │ Slightly increase PLA nozzle temp to 225°C │
│                                 │                             │ to improve layer adhesion while staying    │
│                                 │                             │ within recommended range.                  │
├─────────────────────────────────┼─────────────────────────────┼────────────────────────────────────────────┤
│ fan_speed_percent               │ 100 → 80                    │ Reduce cooling to 80% to improve layer     │
│                                 │                             │ bonding, while maintaining enough cooling  │
│                                 │                             │ for the surface details.                   │
├─────────────────────────────────┼─────────────────────────────┼────────────────────────────────────────────┤
│ speeds.wall_inner               │ 150 → 100                   │ Slow down inner walls to 100 mm/s to       │
│                                 │                             │ reduce vibration and improve bonding.      │
╰─────────────────────────────────┴─────────────────────────────┴────────────────────────────────────────────╯

╭ ★ Strategy ──────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ❯ Settings biased towards strength: more perimeters and infill, higher temperature, reduced cooling, and reduced │
│ speeds on critical sections for better layer adhesion.                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

╭──────────────────────────────────────────────────╮
│ ✔ Optimized project written to test-ny.3mf       │
╰──────────────────────────────────────────────────╯

Advanced Options

| Flag | Description | | :----------------------- | :--------------------------------------------------------------------- | | --output <file> | Specify the output filename (default: *.optimized.3mf). | | --force | Allow the AI to overwrite settings you manually changed in the slicer. | | --verbose | Show the full prompt and JSON payload sent to the AI. | | --mock-response <file> | Use a saved JSON response instead of calling the API (for testing). |

How It Works

  1. Parses: Extracts printer info, filament data, and current settings from the .3mf archive.
  2. Analyzes: Sends a summary and plate previews to the LLM.
  3. Optimizes: The AI suggests specific setting changes based on your goal.
  4. Applies: Updates the configuration files inside the archive.
  5. Saves: Writes a new .3mf file. Geometry is never touched.

Development

# Install dependencies
npm install

# Run tests
npm test

# Lint code
npm run lint

Note: This tool is experimental. Always preview the sliced file in Bambu Studio before printing.