-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npx? #15
Comments
Hi @Vanuan Although it's not as if the current solution is too difficult; you just:
With an npx command, we would reduce this by just one step:
Of course, it has its merits. By running As for supporting other libraries, that is out the scope of this project, though, as it would not make sense for Artifacts. They are supposed to run in Claude's website, so we are restricted to Anthropic's choices of tech stack. If we go out of that scope, then the users would not be making Artifacts at all, they would be making React components that couldn't be previewed on the online Artifact's viewer. In that case, they would be better off using Cursor or some other tools (e.g. Bolt.new). Nevertheless, these options do seem interesting:
I'll think about it. |
Well, If I'm going to set up my own repo, why would I go with claude-artifact-runner? Compare:
vs
If I could just download the artifact, open the terminal and run it in a single command:
Which would open the artifact in a browser. Just thought you would like a feedback. Of course, you could go in a completely different direction.
But if the initial setup becomes complicated, bolt.diy would make a better return of the time investment. |
Well, you need to have a project boilerplate to start from, and no, a generic React+Vite boilerplate (or similar) is not enough; you would still have to add all required dependencies and components that match what Claude believes is available on the Artifacts environment. You do make some interesting points, though. So, I will accept the suggestions that make the project even more convenient:
As for the "completely different direction", I'm not convinced it would be wise to expand the project's focus too much, as that would make it useless for the intended target audience: the more features we add, the more it loses the appeal of being a simple boilerplate to serve as a starting point for an app based on an Artifact. It could be an interesting idea for a new project, though, but I'm not sure there would be enough interest to justify building it. Anyway, thanks for taking the time to provide some feedback. I do appreciate it. 🙂 |
Here's some draft for setting up bun local templates: # Step 1: Create Local Template for `car` using Bun
mkdir -p ~/.bun-create/car && cd ~/.bun-create/car
# Step 2: Curl the package.json file
curl -O https://raw.githubusercontent.com/claudio-silva/claude-artifact-runner/main/package.json
# Step 3: Add bun-create section to package.json
jq '. + { "bun-create": { "preinstall": "echo Installing...", "postinstall": ["echo Done!"], "start": "bun run echo Hello world!" } }' package.json > tmp.json && mv tmp.json package.json
# Step 4: Verify the project setup
echo "Template car set up in ~/.bun-create/car" This script will:
Usage:
Though, bun may need some adjustments: https://bun.sh/guides/ecosystem/vite This way, you don't need to clone anything, just run the template installation script. If this works, you could build upon it and publish in on npm, so that it will work with npx and yarn create as well. |
BTW, a list of claude artifact dependencies appears to be maintained here: LibreChat uses sandpack in case you decide to extend the project scope: |
You might ask how Here are the cons of the latter:
P.S. I've summarised the discussion for easier reference. |
Summary
Suggestions on improving the setup process and considering additional features for the
claude-artifact-runner
project. Here are the main points:Initial Setup:
npx
command to streamline the process.Feedback and Suggestions:
npm create
ornpx create
feature for easier setup.Implementation Ideas:
car-dependencies.json
into a dedicated repositorygit clone
for creating new projects, such as avoiding disruption of workflow, reducing unnecessary repository history, and providing predefined scripts and configurations.Points of Debate:
Overall, the discussion focuses on enhancing user convenience and considering the scope of additional features.
Original
I would've expected easier UX. Something like:
Maybe with optional plugins if claude will support other libraries:
Then you could extract the runner into full project:
That would setup a template project with various templates. For example, vite:
You could setup multiple artifacts:
Just something to think about
The text was updated successfully, but these errors were encountered: