puter/packages/puter-js
Sam Atkins 0aa5543397 Let AppConnection know if its target app uses the Puter SDK
Apps are not required to use the Puter SDK. If they don't, then we can
still launch them, close them, and listen to their close event, but are
unable to send messages to them.
2024-04-19 15:52:59 +01:00
..
src Let AppConnection know if its target app uses the Puter SDK 2024-04-19 15:52:59 +01:00
test Make Puter.js verbosity optional via debug flag. 2024-04-13 17:31:29 -07:00
.gitignore -dot- 2024-04-11 21:46:43 -04:00
APACHE_LICENSE.txt -dot- 2024-04-11 21:46:43 -04:00
app-migration-guide.txt -dot- 2024-04-11 21:46:43 -04:00
package-lock.json -dot- 2024-04-11 21:46:43 -04:00
package.json -dot- 2024-04-11 21:46:43 -04:00
README.md Update README.md files for monorepo'd projects 2024-04-12 23:54:41 -04:00

Puter.js

The official JavaScript SDK for Puter.com. Cloud and AI features right from your frontend code!

« LIVE DEMO »

Docs · Puter.com · Discord · Reddit · X (Twitter)

Example

Make sure the development server is running.

<html>
<body>
    <script src="http://puter.localhost:4100/sdk/puter.dev.js"></script>
    <script>
        // Loading ...
        puter.print(`Loading...`);

        // Chat with GPT-3.5 Turbo
        puter.ai.chat(`What color was Napoleon's white horse?`).then((response) => {
            puter.print(response);
        });
    </script>
</body>
</html>