Giter VIP home page Giter VIP logo

platform's Introduction

Slapdash Platform

This repository contains documentation, tools and examples for extending Slapdash.

Documentation

Documentation is published to platform.slapdash.com via GitBook and is backed by the docs directory in this repository.

Publish Command

Commands built by the community can be found in the commands directory. All these commands are featured on Slapdash where everyone can discover them and add to their Slapdash accounts.

If you want to publish your command, check out the instructions.

Language-specific Templates

We maintain simple examples of how you can write commands in the language of your choice in the templates directory.

Command Response TypeScript Types

If you are writing a command in TypeScript, we maintain a package of types for the Command Response specification.

platform's People

Contributors

anishde12020 avatar ivan-slapdash avatar oleg-slapdash avatar taras-slapdash avatar tedisagolli avatar zuta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

platform's Issues

Default value in text field not displayed

Hello,

When returning a form after a slapdah command, I specify a default value in the textarea field.

Fields {
type: 'text',
id: 'translated',
label: 'Text translated',
multiline: true,
defaultValue: 'Hello to all',
helpText: 'Hello to all'
}

But this one is not displayed, while it is well sent. I do not understand why it is not displayed?

image

I try to make a translation command. And for that, I want to display the text already translated in a new form. But it is not displayed.

Security interrogation about remote scripts execution

Hey, I just discoverd the slapdash extension api and I am really impressed by it.

I have an interrogation about the publishing model : it seems like you store an url to the contributed scripts in this central repository.
What happens if a contributor decide to update his script to execute code on my machine ? Is there any safeguards against it ?

A more full-fledged developer portal

Although it is completely fine for a developer to open a pr to this repository to add their command, a developer portal might be something that will make more sense in the future (as Slapdash grows, more developers start creating commands for Slapdash). It can also have other features like monitoring the usage of cloud commands (simple analytics like the number of users etc.)

Would like to know the team's thoughts on this

P.S. I think GitHub Discussions should be enabled for this repository, and this issue should be converted to a discussion.

Changelog just died on the website

image
also help center
image

Looks like we are close to EOL for slapdash ๐Ÿ˜ญ, guess we just wait for raycast too launch on windows in 2027 ๐Ÿคฃ

Execute a command only when an option is selected

I'm developing an app that lets users manage AWS infrastructure, and I want to implement an action that triggers a command only when it's selected.
To give an example, I want to have this option:

{
	type : "some-action",
	action: resource.destroy()
}

The issue is with the way slapdash is working now. I cannot run resources.destroy() command only when the option is selected. It always gets executed when rendering the response.

This is more of a question than an issue. Is it intended to use slapdash like this?

I was thinking of finding a way to implement a hook mechanism to execute a command inside the program when the copy action is called.

[Question] How to make the command be called every time you type something.

This is the case for the unsplash command. Which makes a new search each time you keep typing.
But in my case, it doesn't work. It only retrieves the first letter, and as soon as you return results, it doesn't call the command again. And subsequent searches are only done in the first list of results.

But I need to redo the search each time, because the results are refined according to the search. How to do this. I don't see any information in the documentation.

Thanks in advance.

How to make a command action that run another script

I am trying to create a local command in powershell, to run an application.

How can have I run a specific script when selecting one action ? I want to run this specific command : Start-Process -FilePath "C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE".

Is it possible ?

The script that I want to do. But with replace copy, with run command :

# PowerShell function to list Start Menu Shortcuts
Function Get-StartMenu{
Begin{
$Path = "$Env:ProgramData\Microsoft\Windows\Start Menu\Programs"
$x=0
      } # End of Begin
Process {
$StartMenu = Get-ChildItem $Path -Recurse -Include *.lnk
ForEach($ShortCut in $StartMenu) {
$Shell = New-Object -ComObject WScript.Shell
$Properties = @{
title = $Shortcut.Name
subtitle = $Shell.CreateShortcut($Shortcut).targetpath
action = @{
type = "copy"
value = "Start-Process -FilePath `"$($Shell.CreateShortcut($Shortcut).targetpath)`""
}
moveAction = @{
type = "add-param"
name = $Shortcut.Name
value = $Shortcut.Name
}
}
New-Object PSObject -Property $Properties
$x ++
        } #End of ForEach
[Runtime.InteropServices.Marshal]::ReleaseComObject($Shell) | Out-Null
    } # End of Process
End{

     }
}
#Echo the json command:


Clear-Host
echo "{ 
	`"view`": {
		`"type`": `"list`",
		`"options`":"
Get-StartMenu | Sort ShortcutName | ConvertTo-Json

"	}
}"

Feature request: more flexibility on script extensions

Since slapdash is able to run any script based on it's shebang, I don't think that the requirements on a specific file extension is necessary.

I want to build a local command using zx, which is based on .mjs scripts.
I currently need to either:

  • switch to a .js extension, but I loose top level async
  • switch to a .sh extension as demonstrated here, but I loose syntax highlighting and code completion (unless I do additional file association setup)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.